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)
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
--- a/src/scheme/irq.rs
|
|
+++ b/src/scheme/irq.rs
|
|
@@ -19,6 +19,9 @@
|
|
|
|
use super::{CallerCtx, HandleMap, OpenResult, SchemeExt, StrOrBytes};
|
|
#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
|
|
+use crate::arch::device::{ioapic, local_apic::ApicId};
|
|
+
|
|
+#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
|
|
use crate::arch::interrupt::{available_irqs_iter, irq::acknowledge, is_reserved, set_reserved};
|
|
#[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))]
|
|
use crate::dtb::irqchip::{acknowledge, available_irqs_iter, is_reserved, set_reserved, IRQ_CHIP};
|
|
@@ -480,6 +483,14 @@
|
|
if !cpus.contains(&(cpu_id as u8)) {
|
|
return Err(Error::new(EINVAL));
|
|
}
|
|
+ // Reprogram the IOAPIC redirection entry for x86 targets.
|
|
+ // Non-IOAPIC IRQs (e.g. MSI) will return false -> EIO.
|
|
+ #[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
|
|
+ {
|
|
+ if !unsafe { ioapic::set_affinity(_handle_irq, ApicId::new(cpu_id)) } {
|
|
+ return Err(Error::new(EIO));
|
|
+ }
|
|
+ }
|
|
mask.store(cpu_id as usize, Ordering::Release);
|
|
Ok(size_of::<u32>())
|
|
}
|