From 26efef4f94e1a0389074bbbe8c842ee1da46fed0 Mon Sep 17 00:00:00 2001 From: Shubham Kulkarni Date: Thu, 11 Feb 2021 15:58:02 +0530 Subject: [PATCH] arch: xtensa: Fix backtrace from ISR a0 is used as scratch register. Restore value of a0 (return address) from stack frame before spilling registers on stack Signed-off-by: Shubham Kulkarni --- arch/xtensa/include/xtensa-asm2-s.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/xtensa/include/xtensa-asm2-s.h b/arch/xtensa/include/xtensa-asm2-s.h index cbfe81a0970..8c998994ccb 100644 --- a/arch/xtensa/include/xtensa-asm2-s.h +++ b/arch/xtensa/include/xtensa-asm2-s.h @@ -194,6 +194,7 @@ /* Recover the interrupted SP from the BSA */ l32i a1, a1, 0 + l32i a0, a1, BSA_A0_OFF addi a1, a1, BASE_SAVE_AREA_SIZE call4 _xstack_call0_\@ @@ -323,6 +324,7 @@ _do_call_\@: */ beq a6, a1, _restore_\@ l32i a1, a1, 0 + l32i a0, a1, BSA_A0_OFF addi a1, a1, BASE_SAVE_AREA_SIZE SPILL_ALL_WINDOWS mov a1, a6