Skip to contentSkip to conversation

hexagon: work around compiler crash

PATCH New [email protected] 1 participant 1 message Jan 4, 2020

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 10/17 hexagon: work around compiler crash

From: Nick Desaulniers <[email protected]>
Subject: hexagon: work around compiler crash

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

---

 arch/hexagon/kernel/stacktrace.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/hexagon/kernel/stacktrace.c renamed from arch/hexagon/kernel/stacktrace.c~hexagon-work-around-compiler-crash +1 -3
@@ -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;

_