diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2021-03-17 16:08:38 +0100 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-04-02 06:37:03 +0200 |
commit | 23c1075ae83adaf14ea3f727c40368799f80bccc (patch) | |
tree | 9205e422692ca9b03ddf72092fd030063e30baf9 /arch | |
parent | Linux 5.12-rc5 (diff) | |
download | linux-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.c | 2 |
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 |