mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
arch/xtensa: set the current reg before print syslog
ensure the semantics of the up_interrupt_context() works as expected Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -189,6 +189,8 @@ void up_assert(const char *filename, int lineno)
|
||||
|
||||
void xtensa_panic(int xptcode, uint32_t *regs)
|
||||
{
|
||||
CURRENT_REGS = regs;
|
||||
|
||||
/* We get here when a un-dispatch-able, irrecoverable exception occurs */
|
||||
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
@@ -203,7 +205,6 @@ void xtensa_panic(int xptcode, uint32_t *regs)
|
||||
_alert("Unhandled Exception %d\n", xptcode);
|
||||
#endif
|
||||
|
||||
CURRENT_REGS = regs;
|
||||
xtensa_assert(); /* Should not return */
|
||||
for (; ; );
|
||||
}
|
||||
@@ -290,6 +291,8 @@ void xtensa_panic(int xptcode, uint32_t *regs)
|
||||
|
||||
void xtensa_user_panic(int exccause, uint32_t *regs)
|
||||
{
|
||||
CURRENT_REGS = regs;
|
||||
|
||||
/* We get here when a un-dispatch-able, irrecoverable exception occurs */
|
||||
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
@@ -305,7 +308,6 @@ void xtensa_user_panic(int exccause, uint32_t *regs)
|
||||
_alert("User Exception: EXCCAUSE=%04x\n", exccause);
|
||||
#endif
|
||||
|
||||
CURRENT_REGS = regs;
|
||||
xtensa_assert(); /* Should not return */
|
||||
for (; ; );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user