Skip to content

Commit b6d8edb

Browse files
rnavKernel Patches Daemon
authored and
Kernel Patches Daemon
committed
powerpc/trace: Account for -fpatchable-function-entry support by toolchain
So far, we have relied on the fact that gcc supports both -mprofile-kernel, as well as -fpatchable-function-entry, and clang supports neither. Our Makefile only checks for CONFIG_MPROFILE_KERNEL to decide which files to build. Clang has a feature request out [*] to implement -fpatchable-function-entry, and is unlikely to support -mprofile-kernel. Update our Makefile checks so that we pick up the correct files to build once clang picks up support for -fpatchable-function-entry. [*] llvm/llvm-project#57031 Signed-off-by: Naveen N Rao <[email protected]>
1 parent 58f6291 commit b6d8edb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

arch/powerpc/kernel/trace/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
99
CFLAGS_REMOVE_ftrace_64_pg.o = $(CC_FLAGS_FTRACE)
1010
endif
1111

12-
obj32-$(CONFIG_FUNCTION_TRACER) += ftrace.o ftrace_entry.o
13-
ifdef CONFIG_MPROFILE_KERNEL
14-
obj64-$(CONFIG_FUNCTION_TRACER) += ftrace.o ftrace_entry.o
12+
ifdef CONFIG_FUNCTION_TRACER
13+
obj32-y += ftrace.o ftrace_entry.o
14+
ifeq ($(CONFIG_MPROFILE_KERNEL)$(CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY),)
15+
obj64-y += ftrace_64_pg.o ftrace_64_pg_entry.o
1516
else
16-
obj64-$(CONFIG_FUNCTION_TRACER) += ftrace_64_pg.o ftrace_64_pg_entry.o
17+
obj64-y += ftrace.o ftrace_entry.o
18+
endif
1719
endif
20+
1821
obj-$(CONFIG_TRACING) += trace_clock.o
1922

2023
obj-$(CONFIG_PPC64) += $(obj64-y)

0 commit comments

Comments
 (0)