1 use system_error::SystemError; 2 3 use crate::arch::CurrentIrqArch; 4 5 use super::{ 6 dummychip::dummy_chip_init, irqdesc::early_irq_init, irqdomain::irq_domain_manager_init, 7 InterruptArch, 8 }; 9 10 /// 初始化中断 11 #[inline(never)] 12 pub fn irq_init() -> Result<(), SystemError> { 13 // todo: 通用初始化 14 15 dummy_chip_init(); 16 irq_domain_manager_init(); 17 early_irq_init().expect("early_irq_init failed"); 18 19 // 初始化架构相关的中断 20 unsafe { CurrentIrqArch::arch_irq_init() }?; 21 return Ok(()); 22 } 23