diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index a2fbe97fd94..78031439c23 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -231,19 +231,6 @@ config SW_ISR_TABLE a parameter to be passed to the interrupt handlers. Also, invoking the exeception/interrupt exit stub is automatically done. - This has to be enabled for dynamically connecting interrupt handlers - at runtime (SW_ISR_TABLE_DYNAMIC). - -config SW_ISR_TABLE_DYNAMIC - bool - prompt "Allow installing interrupt handlers at runtime" - depends on SW_ISR_TABLE - default n - help - This option enables irq_connect_dynamic(). It moves the ISR table to - SRAM so that it is writable. This has the side-effect of removing - write-protection on the ISR table. - config IRQ_VECTOR_TABLE_CUSTOM bool prompt "Projects provide a custom static IRQ part of vector table" diff --git a/arch/arc/core/irq_manage.c b/arch/arc/core/irq_manage.c index bd9dc29d573..30f043be987 100644 --- a/arch/arc/core/irq_manage.c +++ b/arch/arc/core/irq_manage.c @@ -22,9 +22,6 @@ * Interrupt management: * * - enabling/disabling - * - dynamic ISR connecting/replacing - * - * SW_ISR_TABLE_DYNAMIC has to be enabled for connecting ISRs at runtime. * * An IRQ number passed to the @a irq parameters found in this file is a * number from 16 to last IRQ number on the platform. @@ -117,75 +114,3 @@ void _irq_spurious(void *unused) ; } -#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(); - int index = irq - 16; - - __ASSERT(irq < CONFIG_NUM_IRQS, "IRQ number too high"); - _sw_isr_table[index].isr = new; - _sw_isr_table[index].arg = arg; - - irq_unlock(key); -} - -/* - * @brief Connect an ISR to an interrupt line - * - * @a isr is connected to interrupt line @a irq, a number greater than or equal - * 16. No prior ISR can have been connected on @a irq interrupt line since the - * system booted. - * - * This routine will hang if another ISR was connected for interrupt line @a irq - * and ASSERT_ON is enabled; if ASSERT_ON is disabled, it will fail silently. - * - * @return the interrupt line number - */ - -int _arch_irq_connect_dynamic( - unsigned int irq, - unsigned int prio, - void (*isr)(void *arg), - void *arg, - uint32_t flags -) -{ - ARG_UNUSED(flags); - _irq_handler_set(irq, isr, arg); - _irq_priority_set(irq, prio); - return irq; -} - -/* - * @internal - * - * @brief Disconnect an ISR from an interrupt line - * - * Interrupt line @a irq is disconnected from its ISR and the latter is - * replaced by _irq_spurious(). irq_disable() should have been called before - * invoking this routine. - * - * @return N/A - */ - -void _irq_disconnect(unsigned int irq) -{ - _irq_handler_set(irq, _irq_spurious, NULL); -} - -#endif /* CONFIG_SW_ISR_TABLE_DYNAMIC */ diff --git a/include/arch/arc/v2/irq.h b/include/arch/arc/v2/irq.h index 23304950e79..503fd21a018 100644 --- a/include/arch/arc/v2/irq.h +++ b/include/arch/arc/v2/irq.h @@ -39,11 +39,6 @@ GTEXT(_arch_irq_connect) GTEXT(_arch_irq_enable) GTEXT(_arch_irq_disable) #else -extern int _arch_irq_connect_dynamic(unsigned int irq, - unsigned int prio, - void (*isr)(void *arg), - void *arg, - uint32_t flags); extern void _arch_irq_enable(unsigned int irq); extern void _arch_irq_disable(unsigned int irq); diff --git a/include/arch/arc/v2/linker.ld b/include/arch/arc/v2/linker.ld index db5f8fb9f00..5786579a3d9 100644 --- a/include/arch/arc/v2/linker.ld +++ b/include/arch/arc/v2/linker.ld @@ -89,7 +89,6 @@ SECTIONS { *(.version_header) KEEP(*(".version_header*")) #endif -#ifndef CONFIG_SW_ISR_TABLE_DYNAMIC KEEP(*(.isr_irq*)) /* @@ -108,7 +107,6 @@ SECTIONS { KEEP(*(SORT(.gnu.linkonce.isr_irq[2-9][0-9]))) /* sections for IRQ100-999 */ KEEP(*(SORT(.gnu.linkonce.isr_irq[1-9][0-9][0-9]))) -#endif *(.text) *(".text.*") @@ -193,21 +191,6 @@ SECTIONS { *(.data) *(".data.*") -#if CONFIG_SW_ISR_TABLE_DYNAMIC - KEEP(*(.isr_irq*)) - - /*The following sections maps the location of the different rows for - the _sw_isr_table. Each row maps to an IRQ entry (handler, argument).*/ - /*In ARC architecture, IRQ 0-15 are reserved for the system and are not - assignable by the user, for that reason the linker sections start - on IRQ 16*/ - /* sections for IRQ16-19 */ - KEEP(*(SORT(.gnu.linkonce.isr_irq[1][6-9]))) - /* sections for IRQ20-99 */ - KEEP(*(SORT(.gnu.linkonce.isr_irq[2-9][0-9]))) - /* sections for IRQ100-999 */ - KEEP(*(SORT(.gnu.linkonce.isr_irq[1-9][0-9][0-9]))) -#endif } GROUP_LINK_IN(RAMABLE_REGION) SECTION_PROLOGUE(initlevel, (OPTIONAL),)