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 2023/04/18 18:53:10 UTC
[nuttx] 02/03: arch/arm64: call PANIC in arm64_fatal_error
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/nuttx.git
commit 2c599bb9e6dbbc41aea992b168bd02a3793865ee
Author: zhangyuan21 <zh...@xiaomi.com>
AuthorDate: Mon Apr 10 21:15:17 2023 +0800
arch/arm64: call PANIC in arm64_fatal_error
Signed-off-by: zhangyuan21 <zh...@xiaomi.com>
---
arch/arm64/src/common/arm64_fatal.c | 33 +++------------------------------
1 file changed, 3 insertions(+), 30 deletions(-)
diff --git a/arch/arm64/src/common/arm64_fatal.c b/arch/arm64/src/common/arm64_fatal.c
index 0bb4b3b552..c941cfe278 100644
--- a/arch/arm64/src/common/arm64_fatal.c
+++ b/arch/arm64/src/common/arm64_fatal.c
@@ -301,25 +301,6 @@ void up_mdelay(unsigned int milliseconds)
}
}
-/****************************************************************************
- * Name: arm64_dump_fatal
- ****************************************************************************/
-
-void arm64_dump_fatal(struct regs_context *regs)
-{
-#ifdef CONFIG_SCHED_BACKTRACE
- struct tcb_s *rtcb = (struct tcb_s *)regs->tpidr_el1;
-
- /* Show back trace */
-
- sched_dumpstack(rtcb->pid);
-#endif
-
- /* Dump the registers */
-
- up_dump_register(regs);
-}
-
/****************************************************************************
* Name: arm64_fatal_error
*
@@ -330,10 +311,10 @@ void arm64_dump_fatal(struct regs_context *regs)
void arm64_fatal_error(unsigned int reason, struct regs_context * reg)
{
uint64_t el, esr, elr, far;
- int cpu = up_cpu_index();
sinfo("reason = %d\n", reason);
- sinfo("arm64_fatal_error: CPU%d task: %s\n", cpu, running_task()->name);
+
+ CURRENT_REGS = (uint64_t *)reg;
if (reason != K_ERR_SPURIOUS_IRQ)
{
@@ -391,13 +372,5 @@ void arm64_fatal_error(unsigned int reason, struct regs_context * reg)
}
}
- if (reg != NULL)
- {
- arm64_dump_fatal(reg);
- }
-
- for (; ; )
- {
- up_mdelay(1000);
- }
+ PANIC();
}