From 583bba8777d926647b82e729009f200036249272 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 12 Nov 2018 15:36:36 +0000 Subject: [PATCH] Revert "firmware: workaround for RPC failures" This reverts commit 59033d258881d5667fbff85e027501274e9ab647. --- artiq/firmware/ksupport/lib.rs | 5 ----- artiq/firmware/libproto_artiq/kernel_proto.rs | 4 ---- artiq/firmware/runtime/session.rs | 10 ---------- 3 files changed, 19 deletions(-) diff --git a/artiq/firmware/ksupport/lib.rs b/artiq/firmware/ksupport/lib.rs index a44a5ccb2..5b3c2bdfd 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -101,7 +101,6 @@ mod api; mod rtio; mod nrt_bus; -static mut NOW: u64 = 0; static mut LIBRARY: Option> = None; #[no_mangle] @@ -186,7 +185,6 @@ fn terminate(exception: &eh_artiq::Exception, backtrace: &mut [usize]) -> ! { } let backtrace = &mut backtrace.as_mut()[0..cursor]; - send(&NowSave(unsafe { NOW })); send(&RunException { exception: kernel_proto::Exception { name: str::from_utf8(exception.name.as_ref()).unwrap(), @@ -510,10 +508,7 @@ pub unsafe fn main() { ptr::write_bytes(__bss_start as *mut u8, 0, (_end - __bss_start) as usize); - send(&NowInitRequest); - recv!(&NowInitReply(now) => NOW = now); (mem::transmute::(__modinit__))(); - send(&NowSave(NOW)); if let Some(typeinfo) = typeinfo { attribute_writeback(typeinfo as *const ()); diff --git a/artiq/firmware/libproto_artiq/kernel_proto.rs b/artiq/firmware/libproto_artiq/kernel_proto.rs index 73c9e2765..cefc27ee5 100644 --- a/artiq/firmware/libproto_artiq/kernel_proto.rs +++ b/artiq/firmware/libproto_artiq/kernel_proto.rs @@ -22,10 +22,6 @@ pub enum Message<'a> { LoadRequest(&'a [u8]), LoadReply(Result<(), dyld::Error<'a>>), - NowInitRequest, - NowInitReply(u64), - NowSave(u64), - RtioInitRequest, RtioDestinationStatusRequest { destination: u8 }, diff --git a/artiq/firmware/runtime/session.rs b/artiq/firmware/runtime/session.rs index 0ed5a3b62..cab4ef25a 100644 --- a/artiq/firmware/runtime/session.rs +++ b/artiq/firmware/runtime/session.rs @@ -63,7 +63,6 @@ macro_rules! unexpected { // Persistent state #[derive(Debug)] struct Congress { - now: u64, cache: Cache, dma_manager: DmaManager, finished_cleanly: Cell @@ -72,7 +71,6 @@ struct Congress { impl Congress { fn new() -> Congress { Congress { - now: 0, cache: Cache::new(), dma_manager: DmaManager::new(), finished_cleanly: Cell::new(true) @@ -365,14 +363,6 @@ fn process_kern_message(io: &Io, aux_mutex: &Mutex, kern_acknowledge() } - &kern::NowInitRequest => - kern_send(io, &kern::NowInitReply(session.congress.now)), - - &kern::NowSave(now) => { - session.congress.now = now; - kern_acknowledge() - } - &kern::DmaRecordStart(name) => { session.congress.dma_manager.record_start(name); kern_acknowledge()