All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 10/17] hexagon: work around compiler crash
@ 2020-01-04 21:00 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-01-04 21:00 UTC (permalink / raw)
  To: akpm, allison, bcain, gregkh, linux-mm, mm-commits, ndesaulniers,
	rfontana, sidneym, tglx, torvalds

From: Nick Desaulniers <ndesaulniers@google.com>
Subject: hexagon: work around compiler crash

Clang cannot translate the string "r30" into a valid register yet.

Link: https://github.com/ClangBuiltLinux/linux/issues/755
Link: http://lkml.kernel.org/r/20191028155722.23419-1-ndesaulniers@google.com
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Sid Manning <sidneym@quicinc.com>
Reviewed-by: Brian Cain <bcain@codeaurora.org>
Cc: Allison Randal <allison@lohutok.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Richard Fontana <rfontana@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/hexagon/kernel/stacktrace.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/arch/hexagon/kernel/stacktrace.c~hexagon-work-around-compiler-crash
+++ a/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
 
 	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;
_


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-04 21:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-04 21:00 [patch 10/17] hexagon: work around compiler crash akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.