From c56268b41614c0e4f286938fb793f66860eba65d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 15 Dec 2016 11:06:41 -0600 Subject: [PATCH] Fix missing CALL0 ABI condition. --- arch/xtensa/src/common/xtensa_panic.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/xtensa/src/common/xtensa_panic.S b/arch/xtensa/src/common/xtensa_panic.S index 46036395c6..9e300190a1 100644 --- a/arch/xtensa/src/common/xtensa_panic.S +++ b/arch/xtensa/src/common/xtensa_panic.S @@ -114,7 +114,12 @@ _xtensa_panic: /* Set up PS for C, reenable hi-pri interrupts, and clear EXCM. */ +#ifdef __XTENSA_CALL0_ABI__ + movi a0, PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM +#else movi a0, PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM | PS_WOE +#endif + wsr a0, PS /* Call C panic handler: Arg1 (A2) = Exception code; Arg 2 (A3) = start @@ -122,6 +127,7 @@ _xtensa_panic: */ mov a3, sp + #ifdef __XTENSA_CALL0_ABI__ call0 xtensa_panic /* Call xtensa_panic. Should not return */ #else