summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2021-03-17 23:08:38 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-04-01 21:37:03 -0700
commit23c1075ae83adaf14ea3f727c40368799f80bccc (patch)
tree9205e422692ca9b03ddf72092fd030063e30baf9
parenta5e13c6df0e41702d2b2c77c8ad41677ebb065b3 (diff)
downloadlwn-23c1075ae83adaf14ea3f727c40368799f80bccc.tar.gz
lwn-23c1075ae83adaf14ea3f727c40368799f80bccc.zip
riscv: Drop const annotation for sp
The const annotation should not be used for 'sp', or it will become read only and lead to bad stack output. Fixes: dec822771b01 ("riscv: stacktrace: Move register keyword to beginning of declaration") Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
-rw-r--r--arch/riscv/kernel/stacktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c
index 3f893c9d9d85..2b3e0cb90d78 100644
--- a/arch/riscv/kernel/stacktrace.c
+++ b/arch/riscv/kernel/stacktrace.c
@@ -14,7 +14,7 @@
#include <asm/stacktrace.h>
-register const unsigned long sp_in_global __asm__("sp");
+register unsigned long sp_in_global __asm__("sp");
#ifdef CONFIG_FRAME_POINTER