summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2021-03-17 16:08:38 +0100
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-04-02 06:37:03 +0200
commit23c1075ae83adaf14ea3f727c40368799f80bccc (patch)
tree9205e422692ca9b03ddf72092fd030063e30baf9 /arch
parentLinux 5.12-rc5 (diff)
downloadlinux-23c1075ae83adaf14ea3f727c40368799f80bccc.tar.xz
linux-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>
Diffstat (limited to 'arch')
-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