cee25393d8
- Fix P15-8-init-cycle-detection.patch: replace visiting+error with seen+silent-skip to eliminate 11 false-positive 'dependency cycle detected' errors on shared deps - Fix P0-daemon-fix-init-notify-unwrap.patch: remove eprintln! for missing INIT_NOTIFY (expected for oneshot_async services, ~7 daemons affected) - Fix driver-manager hotplug loop: add PERMANENTLY_SKIPPED static set shared between hotplug handler and DriverConfig::probe() to stop infinite re-probing of Fatal/NotSupported/deferred-exhausted device+driver pairs (e.g. ided) - Fix driver-manager log_timeline: suppress repeated EPIPE/ENOENT errors with AtomicI32 dedup and AtomicBool one-shot guards for boot timeline JSON - Add driver-manager SIGTERM handler, ACPI bus registration, --status mode, driver reap loop, graceful shutdown, and reduced deferred retries (30→3)
115 lines
3.9 KiB
Diff
115 lines
3.9 KiB
Diff
--- a/src/arch/x86_shared/idt.rs
|
|
+++ b/src/arch/x86_shared/idt.rs
|
|
@@ -110,6 +110,8 @@
|
|
}
|
|
|
|
pub fn available_irqs_iter(cpu_id: LogicalCpuId) -> impl Iterator<Item = u8> + 'static {
|
|
+ let count = (32..=254).filter(|&index| !is_reserved(cpu_id, index)).count();
|
|
+ info!("available_irqs_iter: cpu_id={} count={}", cpu_id.get(), count);
|
|
(32..=254).filter(move |&index| !is_reserved(cpu_id, index))
|
|
}
|
|
|
|
--- a/src/scheme/irq.rs
|
|
+++ b/src/scheme/irq.rs
|
|
@@ -83,7 +83,7 @@
|
|
#[allow(dead_code)]
|
|
enum Handle {
|
|
SchemeRoot,
|
|
- Irq { ack: AtomicUsize, irq: u8 },
|
|
+ Irq { ack: AtomicUsize, irq: u8, cpu_id: LogicalCpuId },
|
|
Avail(LogicalCpuId),
|
|
TopLevel,
|
|
Phandle(u8, Vec<u8>),
|
|
@@ -93,7 +93,7 @@
|
|
impl Handle {
|
|
fn as_irq_handle(&self) -> Option<(&AtomicUsize, u8)> {
|
|
match self {
|
|
- &Self::Irq { ref ack, irq } => Some((ack, irq)),
|
|
+ &Self::Irq { ref ack, irq, cpu_id: _ } => Some((ack, irq)),
|
|
_ => None,
|
|
}
|
|
}
|
|
@@ -147,6 +147,7 @@
|
|
Handle::Irq {
|
|
ack: AtomicUsize::new(0),
|
|
irq: irq_number,
|
|
+ cpu_id: LogicalCpuId::BSP,
|
|
},
|
|
InternalFlags::empty(),
|
|
)
|
|
@@ -165,6 +166,7 @@
|
|
Handle::Irq {
|
|
ack: AtomicUsize::new(0),
|
|
irq: irq_number,
|
|
+ cpu_id,
|
|
},
|
|
InternalFlags::empty(),
|
|
)
|
|
@@ -206,6 +208,7 @@
|
|
Handle::Irq {
|
|
ack: AtomicUsize::new(0),
|
|
irq: irq_number as u8,
|
|
+ cpu_id: LogicalCpuId::new(0),
|
|
},
|
|
InternalFlags::empty(),
|
|
)
|
|
@@ -349,6 +352,7 @@
|
|
Handle::Irq {
|
|
ack: AtomicUsize::new(0),
|
|
irq: plain_irq_number,
|
|
+ cpu_id: LogicalCpuId::BSP,
|
|
},
|
|
InternalFlags::empty(),
|
|
)
|
|
@@ -404,6 +408,7 @@
|
|
}
|
|
}
|
|
Handle::Avail(cpu_id) => {
|
|
+ let mut listed = 0;
|
|
for vector in available_irqs_iter(cpu_id).skip(opaque) {
|
|
let irq = vector_to_irq(vector);
|
|
if cpu_id == LogicalCpuId::BSP && irq < BASE_IRQ_COUNT {
|
|
@@ -417,7 +422,9 @@
|
|
name: &intermediate,
|
|
next_opaque_id: u64::from(vector) + 1,
|
|
})?;
|
|
+ listed += 1;
|
|
}
|
|
+ info!("irq getdents Avail: cpu_id={} opaque={} listed={}", cpu_id.get(), opaque, listed);
|
|
}
|
|
_ => return Err(Error::new(ENOTDIR)),
|
|
}
|
|
@@ -452,11 +459,14 @@
|
|
let handle = handles_guard.get(id)?;
|
|
|
|
if let &Handle::Irq {
|
|
- irq: handle_irq, ..
|
|
+ irq: handle_irq,
|
|
+ cpu_id: handle_cpu_id,
|
|
+ ..
|
|
} = handle
|
|
&& handle_irq > BASE_IRQ_COUNT
|
|
{
|
|
- set_reserved(LogicalCpuId::BSP, irq_to_vector(handle_irq), false);
|
|
+ info!("irq close: unreserving vector {} on cpu_id={}", irq_to_vector(handle_irq), handle_cpu_id.get());
|
|
+ set_reserved(handle_cpu_id, irq_to_vector(handle_irq), false);
|
|
}
|
|
Ok(())
|
|
}
|
|
@@ -497,6 +507,7 @@
|
|
&Handle::Irq {
|
|
irq: handle_irq,
|
|
ack: ref handle_ack,
|
|
+ cpu_id: _,
|
|
} => {
|
|
if buffer.len() < size_of::<usize>() {
|
|
return Err(Error::new(EINVAL));
|
|
@@ -611,6 +622,7 @@
|
|
Handle::Irq {
|
|
irq: handle_irq,
|
|
ack: ref handle_ack,
|
|
+ cpu_id: _,
|
|
} => {
|
|
if buffer.len() < size_of::<usize>() {
|
|
return Err(Error::new(EINVAL));
|