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(); }