From 2fff96802b605ac4fa29f6264c2ab37a4bb1497f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 10 Sep 2018 23:09:02 +0800 Subject: [PATCH] runtime: remove support for building without RTIO --- artiq/firmware/runtime/kern_hwreq.rs | 5 ----- artiq/firmware/runtime/main.rs | 2 -- artiq/firmware/runtime/session.rs | 17 +++++------------ 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/artiq/firmware/runtime/kern_hwreq.rs b/artiq/firmware/runtime/kern_hwreq.rs index aae7bc99c..4e758ec8d 100644 --- a/artiq/firmware/runtime/kern_hwreq.rs +++ b/artiq/firmware/runtime/kern_hwreq.rs @@ -1,7 +1,6 @@ use kernel_proto as kern; use sched::{Io, Error as SchedError}; use session::{kern_acknowledge, kern_send, Error}; -#[cfg(has_rtio_core)] use rtio_mgt; #[cfg(has_drtio)] @@ -292,25 +291,21 @@ mod spi { pub fn process_kern_hwreq(io: &Io, request: &kern::Message) -> Result> { match request { - #[cfg(has_rtio_core)] &kern::RtioInitRequest => { info!("resetting RTIO"); rtio_mgt::init_core(false); kern_acknowledge() } - #[cfg(has_rtio_core)] &kern::DrtioLinkStatusRequest { linkno } => { let up = rtio_mgt::drtio::link_up(linkno); kern_send(io, &kern::DrtioLinkStatusReply { up: up }) } - #[cfg(has_rtio_core)] &kern::DrtioPacketCountRequest { linkno } => { let (tx_cnt, rx_cnt) = rtio_mgt::drtio_dbg::get_packet_counts(linkno); kern_send(io, &kern::DrtioPacketCountReply { tx_cnt: tx_cnt, rx_cnt: rx_cnt }) } - #[cfg(has_rtio_core)] &kern::DrtioBufferSpaceReqCountRequest { linkno } => { let cnt = rtio_mgt::drtio_dbg::get_buffer_space_req_count(linkno); kern_send(io, &kern::DrtioBufferSpaceReqCountReply { cnt: cnt }) diff --git a/artiq/firmware/runtime/main.rs b/artiq/firmware/runtime/main.rs index b4a9454bb..4a567ed82 100644 --- a/artiq/firmware/runtime/main.rs +++ b/artiq/firmware/runtime/main.rs @@ -40,7 +40,6 @@ use proto_artiq::{mgmt_proto, moninj_proto, rpc_proto, session_proto, kernel_pro #[cfg(has_rtio_analyzer)] use proto_artiq::analyzer_proto; -#[cfg(has_rtio_core)] mod rtio_mgt; mod urc; @@ -290,7 +289,6 @@ fn startup_ethernet() { let mut scheduler = sched::Scheduler::new(); let io = scheduler.io(); - #[cfg(has_rtio_core)] rtio_mgt::startup(&io); io.spawn(4096, mgmt::thread); diff --git a/artiq/firmware/runtime/session.rs b/artiq/firmware/runtime/session.rs index d9812861b..d5a2722d2 100644 --- a/artiq/firmware/runtime/session.rs +++ b/artiq/firmware/runtime/session.rs @@ -7,7 +7,6 @@ use board_misoc::{ident, cache, config}; use {mailbox, rpc_queue, kernel}; use urc::Urc; use sched::{ThreadHandle, Io, TcpListener, TcpStream, Error as SchedError}; -#[cfg(has_rtio_core)] use rtio_mgt; use rtio_dma::Manager as DmaManager; use cache::Cache; @@ -517,12 +516,9 @@ fn host_kernel_worker(io: &Io, return Err(Error::WatchdogExpired(idx)) } - #[cfg(has_rtio_core)] - { - if !rtio_mgt::crg::check() { - host_write(stream, host::Reply::ClockFailure)?; - return Err(Error::ClockFailure) - } + if !rtio_mgt::crg::check() { + host_write(stream, host::Reply::ClockFailure)?; + return Err(Error::ClockFailure) } } @@ -562,11 +558,8 @@ fn flash_kernel_worker(io: &Io, return Err(Error::WatchdogExpired(idx)) } - #[cfg(has_rtio_core)] - { - if !rtio_mgt::crg::check() { - return Err(Error::ClockFailure) - } + if !rtio_mgt::crg::check() { + return Err(Error::ClockFailure) } io.relinquish()?