sw_isr_table.h: clean up definition
This private data structure now no longer introduces a typedef or uses CamelCase. It's not necessary to specify the size of extern arrays, so we don't need a block of #ifdefs for every arch. Change-Id: I71fe61822ecef29820280a43d5ac2822a61f7082 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
d490573933
commit
164ba8c5cd
6 changed files with 26 additions and 31 deletions
|
@ -77,7 +77,7 @@ void _enter_irq(uint32_t ipending)
|
|||
#endif
|
||||
|
||||
while (ipending) {
|
||||
_IsrTableEntry_t *ite;
|
||||
struct _isr_table_entry *ite;
|
||||
|
||||
#ifdef CONFIG_KERNEL_EVENT_LOGGER_INTERRUPT
|
||||
_sys_k_event_logger_interrupt();
|
||||
|
|
|
@ -62,10 +62,10 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio,
|
|||
* accept constant values for the irq_p parameter, very important as the
|
||||
* numerical IRQ line is used to create a named section.
|
||||
*
|
||||
* 2. An instance of _IsrTableEntry is created containing the ISR and its
|
||||
* parameter. If you look at how _sw_isr_table is created, each entry in the
|
||||
* array is in its own section named by the IRQ line number. What we are doing
|
||||
* here is to override one of the default entries (which points to the
|
||||
* 2. An instance of struct _isr_table_entry is created containing the ISR and
|
||||
* its parameter. If you look at how _sw_isr_table is created, each entry in
|
||||
* the array is in its own section named by the IRQ line number. What we are
|
||||
* doing here is to override one of the default entries (which points to the
|
||||
* spurious IRQ handler) with what was supplied here.
|
||||
*
|
||||
* 3. The priority level for the interrupt is configured by a call to
|
||||
|
@ -82,7 +82,7 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio,
|
|||
#define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
|
||||
({ \
|
||||
enum { IRQ = irq_p }; \
|
||||
static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \
|
||||
static struct _isr_table_entry _CONCAT(_isr_irq, irq_p) \
|
||||
__attribute__ ((used)) \
|
||||
__attribute__ ((section(STRINGIFY(_CONCAT(.gnu.linkonce.isr_irq, irq_p))))) = \
|
||||
{isr_param_p, isr_p}; \
|
||||
|
|
|
@ -68,10 +68,10 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio,
|
|||
* accept constant values for the irq_p parameter, very important as the
|
||||
* numerical IRQ line is used to create a named section.
|
||||
*
|
||||
* 2. An instance of _IsrTableEntry is created containing the ISR and its
|
||||
* parameter. If you look at how _sw_isr_table is created, each entry in the
|
||||
* array is in its own section named by the IRQ line number. What we are doing
|
||||
* here is to override one of the default entries (which points to the
|
||||
* 2. An instance of struct _isr_table_entry is created containing the ISR and
|
||||
* its parameter. If you look at how _sw_isr_table is created, each entry in
|
||||
* the array is in its own section named by the IRQ line number. What we are
|
||||
* doing here is to override one of the default entries (which points to the
|
||||
* spurious IRQ handler) with what was supplied here.
|
||||
*
|
||||
* 3. The priority level for the interrupt is configured by a call to
|
||||
|
@ -88,7 +88,7 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio,
|
|||
#define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
|
||||
({ \
|
||||
enum { IRQ = irq_p }; \
|
||||
static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \
|
||||
static struct _isr_table_entry _CONCAT(_isr_irq, irq_p) \
|
||||
__attribute__ ((used)) \
|
||||
__attribute__ ((section(STRINGIFY(_CONCAT(.gnu.linkonce.isr_irq, irq_p))))) = \
|
||||
{isr_param_p, isr_p}; \
|
||||
|
|
|
@ -55,10 +55,10 @@ typedef unsigned int vaddr_t;
|
|||
* accept constant values for the irq_p parameter, very important as the
|
||||
* numerical IRQ line is used to create a named section.
|
||||
*
|
||||
* 2. An instance of _IsrTableEntry is created containing the ISR and its
|
||||
* parameter. If you look at how _sw_isr_table is created, each entry in the
|
||||
* array is in its own section named by the IRQ line number. What we are doing
|
||||
* here is to override one of the default entries (which points to the
|
||||
* 2. An instance of struct _isr_table_entry is created containing the ISR and
|
||||
* its parameter. If you look at how _sw_isr_table is created, each entry in
|
||||
* the array is in its own section named by the IRQ line number. What we are
|
||||
* doing here is to override one of the default entries (which points to the
|
||||
* spurious IRQ handler) with what was supplied here.
|
||||
*
|
||||
* There is no notion of priority with the Nios II internal interrupt
|
||||
|
@ -75,7 +75,7 @@ typedef unsigned int vaddr_t;
|
|||
#define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
|
||||
({ \
|
||||
enum { IRQ = irq_p }; \
|
||||
static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \
|
||||
static struct _isr_table_entry _CONCAT(_isr_irq, irq_p) \
|
||||
__attribute__ ((used)) \
|
||||
__attribute__ ((section(STRINGIFY(_CONCAT(.gnu.linkonce.isr_irq, irq_p))))) = \
|
||||
{isr_param_p, isr_p}; \
|
||||
|
|
|
@ -69,10 +69,10 @@ int _arch_irq_is_enabled(unsigned int irq);
|
|||
* accept constant values for the irq_p parameter, very important as the
|
||||
* numerical IRQ line is used to create a named section.
|
||||
*
|
||||
* 2. An instance of _IsrTableEntry is created containing the ISR and its
|
||||
* parameter. If you look at how _sw_isr_table is created, each entry in the
|
||||
* array is in its own section named by the IRQ line number. What we are doing
|
||||
* here is to override one of the default entries (which points to the
|
||||
* 2. An instance of struct _isr_table_entry is created containing the ISR and
|
||||
* its parameter. If you look at how _sw_isr_table is created, each entry in
|
||||
* the array is in its own section named by the IRQ line number. What we are
|
||||
* doing here is to override one of the default entries (which points to the
|
||||
* spurious IRQ handler) with what was supplied here.
|
||||
*
|
||||
* 3. interrupt priority is not supported by pulpino core
|
||||
|
@ -88,7 +88,7 @@ int _arch_irq_is_enabled(unsigned int irq);
|
|||
#define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
|
||||
({ \
|
||||
enum { IRQ = irq_p }; \
|
||||
static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \
|
||||
static struct _isr_table_entry _CONCAT(_isr_irq, irq_p) \
|
||||
__attribute__ ((used)) \
|
||||
__attribute__ ((section(STRINGIFY(_CONCAT(.gnu.linkonce.isr_irq, irq_p))))) = \
|
||||
{isr_param_p, isr_p}; \
|
||||
|
|
|
@ -26,20 +26,15 @@ extern "C" {
|
|||
* loaded arg -> r0, isr -> r3 in _isr_wrapper with one ldmia instruction,
|
||||
* on ARM Cortex-M (Thumb2).
|
||||
*/
|
||||
struct _IsrTableEntry {
|
||||
struct _isr_table_entry {
|
||||
void *arg;
|
||||
void (*isr)(void *);
|
||||
};
|
||||
|
||||
typedef struct _IsrTableEntry _IsrTableEntry_t;
|
||||
|
||||
#ifdef CONFIG_ARC
|
||||
extern _IsrTableEntry_t _sw_isr_table[CONFIG_NUM_IRQS - 16];
|
||||
#elif CONFIG_NIOS2
|
||||
extern _IsrTableEntry_t _sw_isr_table[NIOS2_NIRQ];
|
||||
#else
|
||||
extern _IsrTableEntry_t _sw_isr_table[CONFIG_NUM_IRQS];
|
||||
#endif
|
||||
/* The software ISR table itself, an array of these structures indexed by the
|
||||
* irq line
|
||||
*/
|
||||
extern struct _isr_table_entry _sw_isr_table[];
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue