Skip to content

Commit d24da1f

Browse files
rnavmpe
authored andcommitted
powerpc/ftrace: Disable ftrace on ppc32 if using clang
Ftrace on ppc32 expects a three instruction sequence at the beginning of each function when specifying -pg: mflr r0 stw r0,4(r1) bl _mcount This is the case with all supported versions of gcc. Clang however emits a branch to _mcount after the function prologue, similar to the pre -mprofile-kernel ABI on ppc64. This is not supported. Disable ftrace on ppc32 if using clang for now. This can be re-enabled later if clang picks up support for -fpatchable-function-entry on ppc32. Signed-off-by: Naveen N Rao <[email protected]> Acked-by: Nick Desaulniers <[email protected]> Link: llvm/llvm-project#63220 Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent f4f913c commit d24da1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ config PPC
236236
select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1
237237
select HAVE_FUNCTION_ERROR_INJECTION
238238
select HAVE_FUNCTION_GRAPH_TRACER
239-
select HAVE_FUNCTION_TRACER
239+
select HAVE_FUNCTION_TRACER if PPC64 || (PPC32 && CC_IS_GCC)
240240
select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
241241
select HAVE_GENERIC_VDSO
242242
select HAVE_HARDLOCKUP_DETECTOR_ARCH if PPC_BOOK3S_64 && SMP

0 commit comments

Comments
 (0)