ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER

Fix for riscv allmodconfig builds. Need sp_in_global to be declared
outside of #ifdef CONFIG_FRAME_POINTER to cover all cases

Fixes: f06e9ec979 ("BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ifeb8901498895bb2079d9541e856b417619a6b78
This commit is contained in:
Todd Kjos 2024-11-21 18:19:34 +00:00
parent f06e9ec979
commit 0215dc2885

View file

@ -12,6 +12,8 @@
#include <linux/stacktrace.h>
#include <linux/ftrace.h>
register unsigned long sp_in_global __asm__("sp");
#ifdef CONFIG_FRAME_POINTER
struct stackframe {
@ -19,8 +21,6 @@ struct stackframe {
unsigned long ra;
};
register unsigned long sp_in_global __asm__("sp");
void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
bool (*fn)(unsigned long, void *), void *arg)
{