提交 3a1e98cd 编写于 作者: N Nick Desaulniers 提交者: Yang Yingliang

hexagon: work around compiler crash

[ Upstream commit 63e80314ab7cf4783526d2e44ee57a90514911c9 ]

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.comSigned-off-by: NNick Desaulniers <ndesaulniers@google.com>
Suggested-by: NSid Manning <sidneym@quicinc.com>
Reviewed-by: NBrian 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 7b5afa7e
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
#include <linux/thread_info.h> #include <linux/thread_info.h>
#include <linux/module.h> #include <linux/module.h>
register unsigned long current_frame_pointer asm("r30");
struct stackframe { struct stackframe {
unsigned long fp; unsigned long fp;
unsigned long rets; unsigned long rets;
...@@ -43,7 +41,7 @@ void save_stack_trace(struct stack_trace *trace) ...@@ -43,7 +41,7 @@ void save_stack_trace(struct stack_trace *trace)
low = (unsigned long)task_stack_page(current); low = (unsigned long)task_stack_page(current);
high = low + THREAD_SIZE; high = low + THREAD_SIZE;
fp = current_frame_pointer; fp = (unsigned long)__builtin_frame_address(0);
while (fp >= low && fp <= (high - sizeof(*frame))) { while (fp >= low && fp <= (high - sizeof(*frame))) {
frame = (struct stackframe *)fp; frame = (struct stackframe *)fp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册