From 852598c491056e79ef2125a14c9b46818dd801c4 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 29 Nov 2016 13:09:26 +0000 Subject: [PATCH 1/3] artiq_devtool: fix incorrect use of nargs in argparse. --- artiq/frontend/artiq_devtool.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/frontend/artiq_devtool.py b/artiq/frontend/artiq_devtool.py index b942b21f5..f30cc99da 100644 --- a/artiq/frontend/artiq_devtool.py +++ b/artiq/frontend/artiq_devtool.py @@ -22,13 +22,13 @@ def get_argparser(): verbosity_args(parser) - parser.add_argument("--host", nargs=1, metavar="HOST", + parser.add_argument("--host", metavar="HOST", type=str, default="lab.m-labs.hk", help="SSH host where the development board is located") - parser.add_argument("--serial", nargs=1, metavar="SERIAL", + parser.add_argument("--serial", metavar="SERIAL", type=str, default="/dev/ttyUSB0", help="TTY device corresponding to the development board") - parser.add_argument("--ip", nargs=1, metavar="IP", + parser.add_argument("--ip", metavar="IP", type=str, default="kc705.lab.m-labs.hk", help="IP address corresponding to the development board") From 5b7e0681579b0be6a33da42797ceb3156dac6755 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 29 Nov 2016 14:00:43 +0000 Subject: [PATCH 2/3] runtime: clear async RPC queue when kernel stops (fixes #631). --- artiq/runtime.rs/src/kernel.rs | 6 ++++-- artiq/runtime.rs/src/session.rs | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/artiq/runtime.rs/src/kernel.rs b/artiq/runtime.rs/src/kernel.rs index 5d7e17696..5096badc1 100644 --- a/artiq/runtime.rs/src/kernel.rs +++ b/artiq/runtime.rs/src/kernel.rs @@ -21,9 +21,11 @@ pub unsafe fn start() { rpc_queue::init(); } -pub fn stop() { - unsafe { csr::kernel_cpu::reset_write(1) } +pub unsafe fn stop() { + csr::kernel_cpu::reset_write(1); + mailbox::acknowledge(); + rpc_queue::init(); } pub fn validate(ptr: usize) -> bool { diff --git a/artiq/runtime.rs/src/session.rs b/artiq/runtime.rs/src/session.rs index b2f58b5d1..c80719489 100644 --- a/artiq/runtime.rs/src/session.rs +++ b/artiq/runtime.rs/src/session.rs @@ -92,7 +92,7 @@ impl<'a> Session<'a> { impl<'a> Drop for Session<'a> { fn drop(&mut self) { - kernel::stop() + unsafe { kernel::stop() } } } @@ -416,7 +416,7 @@ fn process_kern_message(waiter: Waiter, } &kern::RunFinished => { - kernel::stop(); + unsafe { kernel::stop() } session.kernel_state = KernelState::Absent; unsafe { session.congress.cache.unborrow() } @@ -428,7 +428,7 @@ fn process_kern_message(waiter: Waiter, } &kern::RunException { exception: ref exn, backtrace } => { - kernel::stop(); + unsafe { kernel::stop() } session.kernel_state = KernelState::Absent; unsafe { session.congress.cache.unborrow() } From 696db326031df3eb7a8e243a42a4a8b9e7105241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Thu, 1 Dec 2016 11:47:04 +0800 Subject: [PATCH 3/3] dashboard: mention disable in CCB policies --- artiq/dashboard/applets_ccb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/dashboard/applets_ccb.py b/artiq/dashboard/applets_ccb.py index f7cfdcac3..1337a5363 100644 --- a/artiq/dashboard/applets_ccb.py +++ b/artiq/dashboard/applets_ccb.py @@ -34,7 +34,7 @@ class AppletsCCBDock(applets.AppletsDock): self.ccbp_group_create.triggered.connect(lambda: self.set_ccbp("create")) ccbp_group_menu.addAction(self.ccbp_group_create) actiongroup.addAction(self.ccbp_group_create) - self.ccbp_group_enable = QtWidgets.QAction("Create and enable applets", + self.ccbp_group_enable = QtWidgets.QAction("Create and enable/disable applets", self.table) self.ccbp_group_enable.setCheckable(True) self.ccbp_group_enable.triggered.connect(lambda: self.set_ccbp("enable")) @@ -57,7 +57,7 @@ class AppletsCCBDock(applets.AppletsDock): self.ccbp_global_create.setChecked(True) ccbp_global_menu.addAction(self.ccbp_global_create) actiongroup.addAction(self.ccbp_global_create) - self.ccbp_global_enable = QtWidgets.QAction("Create and enable applets", + self.ccbp_global_enable = QtWidgets.QAction("Create and enable/disable applets", self.table) self.ccbp_global_enable.setCheckable(True) ccbp_global_menu.addAction(self.ccbp_global_enable)