Skip to content

Commit

Permalink
riscv: Drop const annotation for sp
Browse files Browse the repository at this point in the history
The const annotation should not be used for 'sp', or it will
become read only and lead to bad stack output.

Fixes: dec8227 ("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>
  • Loading branch information
Kefeng Wang authored and Palmer Dabbelt committed Apr 2, 2021
1 parent a5e13c6 commit 23c1075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 23c1075

Please sign in to comment.