From 4835431ac3db457f02298495d52a4822fcee4e65 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 3 Nov 2017 16:04:17 +0000 Subject: [PATCH] runtime: allow #[cfg(not(has_kernel_cpu))] builds. --- artiq/firmware/runtime/kernel.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/artiq/firmware/runtime/kernel.rs b/artiq/firmware/runtime/kernel.rs index d6122d4d5..9e02ce82c 100644 --- a/artiq/firmware/runtime/kernel.rs +++ b/artiq/firmware/runtime/kernel.rs @@ -5,6 +5,7 @@ use rpc_queue; use kernel_proto::{KERNELCPU_EXEC_ADDRESS, KERNELCPU_LAST_ADDRESS, KSUPPORT_HEADER_SIZE}; +#[cfg(has_kernel_cpu)] pub unsafe fn start() { if csr::kernel_cpu::reset_read() == 0 { panic!("attempted to start kernel CPU when it is already running") @@ -27,7 +28,13 @@ pub unsafe fn start() { rpc_queue::init(); } +#[cfg(not(has_kernel_cpu))] +pub unsafe fn start() { + unimplemented!("not(has_kernel_cpu)") +} + pub unsafe fn stop() { + #[cfg(has_kernel_cpu)] csr::kernel_cpu::reset_write(1); mailbox::acknowledge();