Skip to content

Commit

Permalink
Remove interrupts::init_pci_intx
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanRoyer committed Dec 22, 2023
1 parent 7ab5298 commit eb2a2fc
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions kernel/interrupts/src/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,6 @@ pub fn init_pl011_rx_interrupt() -> Result<(), &'static str> {
int_ctrl.set_destination(PL011_RX_SPI, Some(current_cpu()), u8::MAX)
}

/// Sets an interrupt handler for legacy PCI interrupts: INTA, INTB, INTC, INTD
pub fn init_pci_intx(handlers: [InterruptHandler; 4]) -> Result<(), &'static str> {
let int_ctrl = SystemInterruptController::get()
.ok_or("SystemInterruptController was not yet initialized")?;
let dst = Some(cpu::bootstrap_cpu().unwrap());

let pci_intx_nums = BOARD_CONFIG.pci_intx.into_iter();
let pci_intx_handlers = handlers.into_iter();

for (int_num, handler) in pci_intx_nums.zip(pci_intx_handlers) {
if let Err(existing_handler) = register_interrupt(int_num, handler) {
if handler as InterruptHandler != existing_handler {
return Err("A different interrupt handler has already been setup for that legacy PCI interrupt");
}
}

int_ctrl.set_destination(int_num, dst, u8::MAX)?;
}

Ok(())
}

/// Registers an interrupt handler at the given IRQ interrupt number.
///
/// The function fails if the interrupt number is reserved or is already in use.
Expand Down

0 comments on commit eb2a2fc

Please sign in to comment.