From: Kefeng Wang Date: Wed, 17 Mar 2021 15:08:38 +0000 (+0800) Subject: riscv: Drop const annotation for sp X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=23c1075ae83adaf14ea3f727c40368799f80bccc;p=linux.git 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 Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c index 3f893c9d9d85a..2b3e0cb90d789 100644 --- a/arch/riscv/kernel/stacktrace.c +++ b/arch/riscv/kernel/stacktrace.c @@ -14,7 +14,7 @@ #include -register const unsigned long sp_in_global __asm__("sp"); +register unsigned long sp_in_global __asm__("sp"); #ifdef CONFIG_FRAME_POINTER