[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191028155722.23419-1-ndesaulniers@google.com>
Date: Mon, 28 Oct 2019 08:57:21 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: bcain@...eaurora.org
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
Sid Manning <sidneym@...cinc.com>,
Allison Randal <allison@...utok.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Richard Fontana <rfontana@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-hexagon@...r.kernel.org, linux-kernel@...r.kernel.org,
clang-built-linux@...glegroups.com
Subject: [PATCH] hexagon: work around compiler crash
Clang cannot translate the string "r30" into a valid register yet.
Link: https://github.com/ClangBuiltLinux/linux/issues/755
Suggested-by: Sid Manning <sidneym@...cinc.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
---
arch/hexagon/kernel/stacktrace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/hexagon/kernel/stacktrace.c b/arch/hexagon/kernel/stacktrace.c
index 35f29423fda8..5ed02f699479 100644
--- a/arch/hexagon/kernel/stacktrace.c
+++ b/arch/hexagon/kernel/stacktrace.c
@@ -11,8 +11,6 @@
#include <linux/thread_info.h>
#include <linux/module.h>
-register unsigned long current_frame_pointer asm("r30");
-
struct stackframe {
unsigned long fp;
unsigned long rets;
@@ -30,7 +28,7 @@ void save_stack_trace(struct stack_trace *trace)
low = (unsigned long)task_stack_page(current);
high = low + THREAD_SIZE;
- fp = current_frame_pointer;
+ fp = (unsigned long)__builtin_frame_address(0);
while (fp >= low && fp <= (high - sizeof(*frame))) {
frame = (struct stackframe *)fp;
--
2.24.0.rc0.303.g954a862665-goog
Powered by blists - more mailing lists