From 66495136ccb283e2247b67cd7be214b7ddd8fe61 Mon Sep 17 00:00:00 2001 From: Janusz Jankowski Date: Wed, 15 May 2019 14:07:17 +0200 Subject: [PATCH] xtensa: coredump: fix stackoffset Signed-off-by: Janusz Jankowski --- src/arch/xtensa/include/arch/sof.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arch/xtensa/include/arch/sof.h b/src/arch/xtensa/include/arch/sof.h index b95d46bbe..4b10ebd18 100644 --- a/src/arch/xtensa/include/arch/sof.h +++ b/src/arch/xtensa/include/arch/sof.h @@ -69,7 +69,8 @@ static inline void fill_core_dump(struct sof_ipc_dsp_oops_xtensa *oops, oops->plat_hdr.configidlo = 0; #endif oops->plat_hdr.numaregs = XCHAL_NUM_AREGS; - oops->plat_hdr.stackoffset = ((void *)&oops->stack) - (void *)oops; + oops->plat_hdr.stackoffset = oops->arch_hdr.totalsize + + sizeof(struct sof_ipc_panic_info); oops->plat_hdr.stackptr = stack_ptr; oops->epc1 = *epc1;