@@ -24,6 +24,7 @@ const MAX_HANDLERS: usize = 256;
24
24
/// The ID of the first Private Peripheral Interrupt.
25
25
const PPI_START : u8 = 16 ;
26
26
/// The ID of the first Shared Peripheral Interrupt.
27
+ #[ allow( dead_code) ]
27
28
const SPI_START : u8 = 32 ;
28
29
/// Software-generated interrupt for rescheduling
29
30
pub ( crate ) const SGI_RESCHED : u8 = 1 ;
@@ -93,6 +94,7 @@ pub fn disable() {
93
94
}
94
95
}
95
96
97
+ #[ allow( dead_code) ]
96
98
pub ( crate ) fn irq_install_handler ( irq_number : u8 , handler : HandlerFunc ) {
97
99
debug ! ( "Install handler for interrupt {}" , irq_number) ;
98
100
unsafe {
@@ -348,7 +350,8 @@ pub(crate) fn init() {
348
350
static IRQ_NAMES : InterruptTicketMutex < HashMap < u8 , & ' static str , RandomState > > =
349
351
InterruptTicketMutex :: new ( HashMap :: with_hasher ( RandomState :: with_seeds ( 0 , 0 , 0 , 0 ) ) ) ;
350
352
351
- pub fn add_irq_name ( irq_number : u8 , name : & ' static str ) {
353
+ #[ allow( dead_code) ]
354
+ pub ( crate ) fn add_irq_name ( irq_number : u8 , name : & ' static str ) {
352
355
debug ! ( "Register name \" {}\" for interrupt {}" , name, irq_number) ;
353
356
IRQ_NAMES . lock ( ) . insert ( SPI_START + irq_number, name) ;
354
357
}
@@ -357,10 +360,10 @@ fn get_irq_name(irq_number: u8) -> Option<&'static str> {
357
360
IRQ_NAMES . lock ( ) . get ( & irq_number) . copied ( )
358
361
}
359
362
360
- pub static IRQ_COUNTERS : InterruptSpinMutex < BTreeMap < CoreId , & IrqStatistics > > =
363
+ pub ( crate ) static IRQ_COUNTERS : InterruptSpinMutex < BTreeMap < CoreId , & IrqStatistics > > =
361
364
InterruptSpinMutex :: new ( BTreeMap :: new ( ) ) ;
362
365
363
- pub struct IrqStatistics {
366
+ pub ( crate ) struct IrqStatistics {
364
367
pub counters : [ AtomicU64 ; 256 ] ,
365
368
}
366
369
@@ -378,7 +381,7 @@ impl IrqStatistics {
378
381
}
379
382
}
380
383
381
- pub fn print_statistics ( ) {
384
+ pub ( crate ) fn print_statistics ( ) {
382
385
info ! ( "Number of interrupts" ) ;
383
386
for ( core_id, irg_statistics) in IRQ_COUNTERS . lock ( ) . iter ( ) {
384
387
for ( i, counter) in irg_statistics. counters . iter ( ) . enumerate ( ) {
0 commit comments