ARM: ARC: put sw_isr_table in ROM by default
We can save a great deal of RAM this way, it only needs to be in RAM if dynamic interrupts are in use. At some point this config option broke, probably when static interrupts were introduced into the system. To induce build (instead of runtime) errors when irq_connect_dynamic() is used without putting the table in RAM, the dynamic interrupt functions are now conditionally compiled. Change-Id: I4860508746fd375d189390163876c59b6c544c9a Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
11f97de957
commit
2a1ae3f436
10 changed files with 93 additions and 68 deletions
|
@ -33,26 +33,6 @@
|
|||
|
||||
extern void __reserved(void);
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @brief Replace an interrupt handler by another
|
||||
*
|
||||
* An interrupt's ISR can be replaced at runtime.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void _irq_handler_set(unsigned int irq,
|
||||
void (*new)(void *arg),
|
||||
void *arg)
|
||||
{
|
||||
int key = irq_lock();
|
||||
|
||||
_sw_isr_table[irq].isr = new;
|
||||
_sw_isr_table[irq].arg = arg;
|
||||
|
||||
irq_unlock(key);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -124,6 +104,28 @@ void _irq_spurious(void *unused)
|
|||
__reserved();
|
||||
}
|
||||
|
||||
#if CONFIG_SW_ISR_TABLE_DYNAMIC
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @brief Replace an interrupt handler by another
|
||||
*
|
||||
* An interrupt's ISR can be replaced at runtime.
|
||||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void _irq_handler_set(unsigned int irq,
|
||||
void (*new)(void *arg),
|
||||
void *arg)
|
||||
{
|
||||
int key = irq_lock();
|
||||
|
||||
_sw_isr_table[irq].isr = new;
|
||||
_sw_isr_table[irq].arg = arg;
|
||||
|
||||
irq_unlock(key);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Connect an ISR to an interrupt line
|
||||
|
@ -164,3 +166,4 @@ void _irq_disconnect(unsigned int irq)
|
|||
{
|
||||
_irq_handler_set(irq, _irq_spurious, NULL);
|
||||
}
|
||||
#endif /* CONFIG_SW_ISR_TABLE_DYNAMIC */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue