From 2dcbf28f15783b30fde57ce99626b41587fff8b6 Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Fri, 11 Mar 2022 16:23:57 +0100 Subject: [PATCH] xtensa_context.S: A1 should be restored by the caller not xtensa_context_resotred. Here it was being restored twice. Remove the one in xtensa_context_restore. Signed-off-by: Abdelatif Guettouche --- arch/xtensa/src/common/xtensa_context.S | 1 - arch/xtensa/src/common/xtensa_int_handlers.S | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/xtensa/src/common/xtensa_context.S b/arch/xtensa/src/common/xtensa_context.S index 03f57728c6d..6b8d2eb97a0 100644 --- a/arch/xtensa/src/common/xtensa_context.S +++ b/arch/xtensa/src/common/xtensa_context.S @@ -279,7 +279,6 @@ _xtensa_context_restore: l32i a3, a2, (4 * REG_SAR) wsr a3, SAR - l32i sp, a2, (4 * REG_A1) l32i a3, a2, (4 * REG_A3) l32i a4, a2, (4 * REG_A4) l32i a5, a2, (4 * REG_A5) diff --git a/arch/xtensa/src/common/xtensa_int_handlers.S b/arch/xtensa/src/common/xtensa_int_handlers.S index b649e8d0c63..c83d4cc9797 100644 --- a/arch/xtensa/src/common/xtensa_int_handlers.S +++ b/arch/xtensa/src/common/xtensa_int_handlers.S @@ -353,7 +353,7 @@ _xtensa_level1_handler: l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_1 l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i sp, a2, (4 * REG_A1) /* Retrieve interrupt stack frame */ l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ rsync /* Ensure PS and EPC written */