forked from M-Labs/artiq
runtime: remove support for building without RTIO
This commit is contained in:
parent
19a14b68b1
commit
2fff96802b
|
@ -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<bool, Error<SchedError>> {
|
||||
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 })
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()?
|
||||
|
|
Loading…
Reference in New Issue