diff options
author | GONG, Ruiqi <gongruiqi1@huawei.com> | 2023-08-20 19:15:09 +0800 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-08-21 22:03:58 -0400 |
commit | e332938e6fc8117fb9bb1374339cea879b3972d9 (patch) | |
tree | 6c908738d957222f7dda426dd6a8e335a67216d9 /samples/ftrace/ftrace-direct-modify.c | |
parent | c2489bb7e6be2e8cdced12c16c42fa128403ac03 (diff) | |
download | lwn-e332938e6fc8117fb9bb1374339cea879b3972d9.tar.gz lwn-e332938e6fc8117fb9bb1374339cea879b3972d9.zip |
samples: ftrace: Replace bti assembly with hint for older compiler
When cross-building the arm64 kernel with allmodconfig using GCC 9.4,
the following error occurs on multiple files under samples/ftrace/:
/tmp/ccPC1ODs.s: Assembler messages:
/tmp/ccPC1ODs.s:8: Error: selected processor does not support `bti c'
Fix this issue by replacing `bti c` with `hint 34`, which is compatible
for the older compiler.
Link: https://lore.kernel.org/linux-trace-kernel/20230820111509.1470826-1-gongruiqi@huaweicloud.com
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Florent Revest <revest@chromium.org>
Fixes: 8c3526fb86060cb5 ("arm64: ftrace: Add direct call trampoline samples support")
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: GONG, Ruiqi <gongruiqi1@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'samples/ftrace/ftrace-direct-modify.c')
-rw-r--r-- | samples/ftrace/ftrace-direct-modify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/ftrace/ftrace-direct-modify.c b/samples/ftrace/ftrace-direct-modify.c index e5ed08098ff3..e2a6a69352df 100644 --- a/samples/ftrace/ftrace-direct-modify.c +++ b/samples/ftrace/ftrace-direct-modify.c @@ -105,7 +105,7 @@ asm ( " .type my_tramp1, @function\n" " .globl my_tramp1\n" " my_tramp1:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #16\n" " stp x9, x30, [sp]\n" " bl my_direct_func1\n" @@ -117,7 +117,7 @@ asm ( " .type my_tramp2, @function\n" " .globl my_tramp2\n" " my_tramp2:" -" bti c\n" +" hint 34\n" // bti c " sub sp, sp, #16\n" " stp x9, x30, [sp]\n" " bl my_direct_func2\n" |