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: dec822771b ("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>
This commit is contained in:
Kefeng Wang 2021-03-17 23:08:38 +08:00 committed by Palmer Dabbelt
parent a5e13c6df0
commit 23c1075ae8
No known key found for this signature in database
GPG key ID: 2E1319F35FBB1889

View file

@ -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