forked from M-Labs/artiq
1
0
Fork 0

runtime: remove support for building without RTIO

This commit is contained in:
Sebastien Bourdeauducq 2018-09-10 23:09:02 +08:00
parent 19a14b68b1
commit 2fff96802b
3 changed files with 5 additions and 19 deletions

View File

@ -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 })

View File

@ -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);

View File

@ -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,14 +516,11 @@ 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)
}
}
}
io.relinquish()?
}
@ -562,12 +558,9 @@ fn flash_kernel_worker(io: &Io,
return Err(Error::WatchdogExpired(idx))
}
#[cfg(has_rtio_core)]
{
if !rtio_mgt::crg::check() {
return Err(Error::ClockFailure)
}
}
io.relinquish()?
}