On 27/01/26 2:19 pm, Hari Bathini wrote:
Support for -fpatchable-function-entry on ppc64le was added in Clang
with [1]. Faced a couple of issues while building the linux kernel
with Clang though. Patches 1 & 2 address those issues. The last patch
provides workaround to ensure, an open issue [2] in Clang with
-fpatchable-function-entry support, does not impact the linux
ftrace subsystem.

[1] https://github.com/llvm/llvm-project/pull/151569
[2] https://github.com/llvm/llvm-project/issues/163706


Hari Bathini (3):
   powerpc64: make clang cross-build friendly
   powerpc64/ftrace: fix OOL stub count with clang
   powerpc64/ftrace: workaround clang recording GEP in
     __patchable_function_entries

  arch/powerpc/Kconfig                          |  4 +--
  arch/powerpc/kernel/trace/ftrace.c            | 26 ++++++++++++++++---
  ....sh => check-fpatchable-function-entry.sh} |  0
  arch/powerpc/tools/ftrace-gen-ool-stubs.sh    |  4 +--
  4 files changed, 26 insertions(+), 8 deletions(-)
  rename arch/powerpc/tools/{gcc-check-fpatchable-function-entry.sh => 
check-fpatchable-function-entry.sh} (100%)

Tested this patch series, and bulild is successful with both GCC and clang23.x version.


KERNEL PARAMETER enabled:

CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY=y
CONFIG_PPC_FTRACE_OUT_OF_LINE=y
CONFIG_PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE=32768


clang version 23.0.0git


Please add below tag for the series.


Tested-by: Venkat Rao Bagalkote <[email protected]>




Regards,

Venkat.


Reply via email to