You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/04 04:33:49 UTC

[incubator-nuttx] 01/04: boards: cxd56xx: Fix crashdump compile error in SMP

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 751f7973e9ce1de810aa3c6ab032e9fd03599fa7
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 12:25:31 2021 +0900

    boards: cxd56xx: Fix crashdump compile error in SMP
    
    In CONFIG_SMP=y, use arm_intstack_top() instead of g_intstacktop
    to get the base address of interrupt stack.
---
 boards/arm/cxd56xx/common/src/cxd56_crashdump.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/boards/arm/cxd56xx/common/src/cxd56_crashdump.c b/boards/arm/cxd56xx/common/src/cxd56_crashdump.c
index 57dee9e..0278b09 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_crashdump.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_crashdump.c
@@ -189,7 +189,11 @@ void board_crashdump(uintptr_t currentsp, FAR void *tcb,
 #if CONFIG_ARCH_INTERRUPTSTACK > 3
   /* Get the limits on the interrupt stack memory */
 
+#ifdef CONFIG_SMP
+  pdump->info.stacks.interrupt.top = (uint32_t)arm_intstack_top();
+#else
   pdump->info.stacks.interrupt.top = (uint32_t)&g_intstacktop;
+#endif
   pdump->info.stacks.interrupt.size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
 
   /* If In interrupt Context save the interrupt stack data centered