This is an automated email from the ASF dual-hosted git repository.
raiden00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 459f8235e4 arch/arm: Let's old arm's arm_doirq return register context
like armv7-a
459f8235e4 is described below
commit 459f8235e45d00f83fd599209c6a8f60659f4660
Author: Xiang Xiao <[email protected]>
AuthorDate: Sun Nov 12 05:05:10 2023 +0800
arch/arm: Let's old arm's arm_doirq return register context like armv7-a
and remove the duplicated arm_doirq and arm_ack_irq prototype
Signed-off-by: Xiang Xiao <[email protected]>
---
arch/arm/src/arm/arm_doirq.c | 5 ++++-
arch/arm/src/common/arm_internal.h | 19 +++++--------------
2 files changed, 9 insertions(+), 15 deletions(-)
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