arch: Switch to new GIC interface

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao
2022-05-31 19:53:22 +08:00
committed by Xin Wang
parent b8dbb26647
commit 04949755c0
6 changed files with 41 additions and 81 deletions

View File

@@ -27,7 +27,7 @@ pub const IRQ_LEGACY_COUNT: usize = 32;
// 2. Move this file and ioapic.rs to arch/, as they are architecture specific.
pub struct Gic {
interrupt_source_group: Arc<dyn InterruptSourceGroup>,
gic_device: Option<Arc<Mutex<Box<dyn GicDevice>>>>,
gic_device: Option<Arc<Mutex<GicDevice>>>,
}
impl Gic {
@@ -48,11 +48,11 @@ impl Gic {
})
}
pub fn set_gic_device(&mut self, gic_device: Arc<Mutex<Box<dyn GicDevice>>>) {
pub fn set_gic_device(&mut self, gic_device: Arc<Mutex<GicDevice>>) {
self.gic_device = Some(gic_device);
}
pub fn get_gic_device(&self) -> Option<&Arc<Mutex<Box<dyn GicDevice>>>> {
pub fn get_gic_device(&self) -> Option<&Arc<Mutex<GicDevice>>> {
self.gic_device.as_ref()
}
}