Skip to content

Commit

Permalink
remove compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Jul 31, 2023
1 parent a227454 commit fb3b505
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/arch/aarch64/kernel/interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const MAX_HANDLERS: usize = 256;
/// The ID of the first Private Peripheral Interrupt.
const PPI_START: u8 = 16;
/// The ID of the first Shared Peripheral Interrupt.
#[allow(dead_code)]
const SPI_START: u8 = 32;
/// Software-generated interrupt for rescheduling
pub(crate) const SGI_RESCHED: u8 = 1;
Expand Down Expand Up @@ -93,6 +94,7 @@ pub fn disable() {
}
}

#[allow(dead_code)]
pub(crate) fn irq_install_handler(irq_number: u8, handler: HandlerFunc) {
debug!("Install handler for interrupt {}", irq_number);
unsafe {
Expand Down Expand Up @@ -348,7 +350,8 @@ pub(crate) fn init() {
static IRQ_NAMES: InterruptTicketMutex<HashMap<u8, &'static str, RandomState>> =
InterruptTicketMutex::new(HashMap::with_hasher(RandomState::with_seeds(0, 0, 0, 0)));

pub fn add_irq_name(irq_number: u8, name: &'static str) {
#[allow(dead_code)]
pub(crate) fn add_irq_name(irq_number: u8, name: &'static str) {
debug!("Register name \"{}\" for interrupt {}", name, irq_number);
IRQ_NAMES.lock().insert(SPI_START + irq_number, name);
}
Expand All @@ -357,10 +360,10 @@ fn get_irq_name(irq_number: u8) -> Option<&'static str> {
IRQ_NAMES.lock().get(&irq_number).copied()
}

pub static IRQ_COUNTERS: InterruptSpinMutex<BTreeMap<CoreId, &IrqStatistics>> =
pub(crate) static IRQ_COUNTERS: InterruptSpinMutex<BTreeMap<CoreId, &IrqStatistics>> =
InterruptSpinMutex::new(BTreeMap::new());

pub struct IrqStatistics {
pub(crate) struct IrqStatistics {
pub counters: [AtomicU64; 256],
}

Expand All @@ -378,7 +381,7 @@ impl IrqStatistics {
}
}

pub fn print_statistics() {
pub(crate) fn print_statistics() {
info!("Number of interrupts");
for (core_id, irg_statistics) in IRQ_COUNTERS.lock().iter() {
for (i, counter) in irg_statistics.counters.iter().enumerate() {
Expand Down

0 comments on commit fb3b505

Please sign in to comment.