diff --git a/arch/arm/src/arm/arm_doirq.c b/arch/arm/src/arm/arm_doirq.c index 59e16a7155..9f7e26c439 100644 --- a/arch/arm/src/arm/arm_doirq.c +++ b/arch/arm/src/arm/arm_doirq.c @@ -56,7 +56,7 @@ * Public Functions ****************************************************************************/ -void arm_doirq(int irq, uint32_t *regs) +uint32_t *arm_doirq(int irq, uint32_t *regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS @@ -105,6 +105,8 @@ void arm_doirq(int irq, uint32_t *regs) */ g_running_tasks[this_cpu()] = this_task(); + + regs = (uint32_t *)CURRENT_REGS; } /* Set CURRENT_REGS to NULL to indicate that we are no longer in an @@ -114,4 +116,5 @@ void arm_doirq(int irq, uint32_t *regs) CURRENT_REGS = NULL; #endif board_autoled_off(LED_INIRQ); + return regs; } diff --git a/arch/arm/src/common/arm_internal.h b/arch/arm/src/common/arm_internal.h index fbcb5887f5..40b4b409f8 100644 --- a/arch/arm/src/common/arm_internal.h +++ b/arch/arm/src/common/arm_internal.h @@ -358,6 +358,11 @@ uintptr_t arm_intstack_top(void); void weak_function arm_initialize_stack(void); #endif +/* Interrupt acknowledge and dispatch */ + +void arm_ack_irq(int irq); +uint32_t *arm_doirq(int irq, uint32_t *regs); + /* Exception handling logic unique to the Cortex-M family */ #if defined(CONFIG_ARCH_ARMV6M) || defined(CONFIG_ARCH_ARMV7M) || \ @@ -375,11 +380,6 @@ EXTERN const void *__vector_table[]; EXTERN const void * const _vectors[]; #endif -/* Interrupt acknowledge and dispatch */ - -void arm_ack_irq(int irq); -uint32_t *arm_doirq(int irq, uint32_t *regs); - /* Exception Handlers */ int arm_svcall(int irq, void *context, void *arg); @@ -400,10 +400,6 @@ int arm_securefault(int irq, void *context, void *arg); #elif defined(CONFIG_ARCH_ARMV7A) || defined(CONFIG_ARCH_ARMV7R) || defined(CONFIG_ARCH_ARMV8R) -/* Interrupt acknowledge and dispatch */ - -uint32_t *arm_doirq(int irq, uint32_t *regs); - /* Paging support */ #ifdef CONFIG_PAGING @@ -424,11 +420,6 @@ uint32_t *arm_undefinedinsn(uint32_t *regs); #else /* ARM7 | ARM9 */ -/* Interrupt acknowledge and dispatch */ - -void arm_ack_irq(int irq); -void arm_doirq(int irq, uint32_t *regs); - /* Paging support (and exception handlers) */ #ifdef CONFIG_PAGING