diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-06-18 16:44:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-06-24 11:36:28 +0200 |
commit | be96cb4345554fac614b252fe8f78dbf32c3a981 (patch) | |
tree | e69c244a4e5ab5dd11bdd4c14ea2c5ef66ef6c34 /bsps/sparc/shared/irq/bsp_isr_handler.c | |
parent | bsps: bsp_interrupt_handler_dispatch_unchecked() (diff) | |
download | rtems-be96cb4345554fac614b252fe8f78dbf32c3a981.tar.bz2 |
sparc: Simplify trap table initialization
Move _ISR_Handler() to a separate file since it is now only used if a handler
is installed by _CPU_ISR_install_raw_handler().
Statically initialize the traps for external interrupts to use the new
_SPARC_Interrupt_trap() which directly dispatches the interrupt handlers
installed by rtems_interrupt_handler_install() via the BSP-provided
_SPARC_Interrupt_dispatch().
Since the trap table is now fully statically initialized, there is no longer a
dependency on the Cache Manager in the default configuration.
Update #4458.
Diffstat (limited to 'bsps/sparc/shared/irq/bsp_isr_handler.c')
-rw-r--r-- | bsps/sparc/shared/irq/bsp_isr_handler.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/bsps/sparc/shared/irq/bsp_isr_handler.c b/bsps/sparc/shared/irq/bsp_isr_handler.c index a4d33b0932..2616b5caae 100644 --- a/bsps/sparc/shared/irq/bsp_isr_handler.c +++ b/bsps/sparc/shared/irq/bsp_isr_handler.c @@ -8,28 +8,19 @@ * */ -#include <rtems.h> #include <bsp.h> #include <bsp/irq-generic.h> -static inline void bsp_dispatch_irq(int irq) -{ - bsp_interrupt_handler_entry *e = - &bsp_interrupt_handler_table[bsp_interrupt_handler_index(irq)]; - - while (e != NULL) { - (*e->handler)(e->arg); - e = e->next; - } -} - -/* Called directly from IRQ trap handler TRAP[0x10..0x1F] = IRQ[0..15] */ -void bsp_isr_handler(rtems_vector_number vector) +/* + * This function is called directly from _SPARC_Interrupt_trap() for + * traps 0x10 to 0x1F which correspond to IRQ 0 to 15 respectively. + */ +void _SPARC_Interrupt_dispatch( uint32_t irq ) { - int irq = vector - 0x10; + bsp_interrupt_assert( irq < BSP_INTERRUPT_VECTOR_COUNT ); - /* Let BSP fixup and/or handle incomming IRQ */ - irq = bsp_irq_fixup(irq); + /* Let BSP fixup and/or handle incoming IRQ */ + irq = bsp_irq_fixup( irq ); - bsp_dispatch_irq(irq); + bsp_interrupt_handler_dispatch_unchecked( irq ); } |