linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hexagon: work around compiler crash
@ 2019-10-28 15:57 Nick Desaulniers
  2019-10-28 20:09 ` Brian Cain
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Desaulniers @ 2019-10-28 15:57 UTC (permalink / raw)
  To: bcain
  Cc: Nick Desaulniers, Sid Manning, Allison Randal,
	Greg Kroah-Hartman, Richard Fontana, Thomas Gleixner,
	linux-hexagon, linux-kernel, clang-built-linux

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

Link: https://github.com/ClangBuiltLinux/linux/issues/755
Suggested-by: Sid Manning <sidneym@quicinc.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] hexagon: work around compiler crash
  2019-10-28 15:57 [PATCH] hexagon: work around compiler crash Nick Desaulniers
@ 2019-10-28 20:09 ` Brian Cain
  2019-12-10  1:36   ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Cain @ 2019-10-28 20:09 UTC (permalink / raw)
  To: 'Nick Desaulniers'
  Cc: 'Sid Manning', 'Allison Randal',
	'Greg Kroah-Hartman', 'Richard Fontana',
	'Thomas Gleixner',
	linux-hexagon, linux-kernel, clang-built-linux

> -----Original Message-----
> From: linux-hexagon-owner@vger.kernel.org <linux-hexagon-
> owner@vger.kernel.org> On Behalf Of Nick Desaulniers
...
> 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@quicinc.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

LGTM.  Thanks, Nick.

Reviewed-by: Brian Cain <bcain@codeaurora.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hexagon: work around compiler crash
  2019-10-28 20:09 ` Brian Cain
@ 2019-12-10  1:36   ` Nick Desaulniers
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2019-12-10  1:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Sid Manning, Allison Randal, Greg Kroah-Hartman, Richard Fontana,
	Thomas Gleixner, linux-hexagon, LKML, clang-built-linux, bcain

+ akpm, looks like you're picking up hexagon patches? Would you mind
please grabbing this one, too?

On Mon, Oct 28, 2019 at 1:09 PM Brian Cain <bcain@codeaurora.org> wrote:
>
> > -----Original Message-----
> > From: linux-hexagon-owner@vger.kernel.org <linux-hexagon-
> > owner@vger.kernel.org> On Behalf Of Nick Desaulniers
> ...
> > 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@quicinc.com>
> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
>
> LGTM.  Thanks, Nick.
>
> Reviewed-by: Brian Cain <bcain@codeaurora.org>
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/002301d58dcb%24a9ffaa80%24fdfeff80%24%40codeaurora.org.



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-10  1:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 15:57 [PATCH] hexagon: work around compiler crash Nick Desaulniers
2019-10-28 20:09 ` Brian Cain
2019-12-10  1:36   ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).