[PATCH] powerpc64/ftrace: Fix ftrace for clang builds

Nick Desaulniers ndesaulniers at google.com
Wed Aug 10 03:10:01 AEST 2022


On Tue, Aug 9, 2022 at 9:59 AM Ondrej Mosnáček <omosnacek at gmail.com> wrote:
>
> On Tue, Aug 9, 2022 at 11:59 AM Naveen N. Rao
> <naveen.n.rao at linux.vnet.ibm.com> wrote:
> > Clang doesn't support -mprofile-kernel ABI, so guard the checks against
> > CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.
> >
> > Fixes: 23b44fc248f420 ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
> > Reported-by: Nick Desaulniers <ndesaulniers at google.com>
> > Reported-by: Ondrej Mosnacek <omosnacek at gmail.com>
> > Signed-off-by: Naveen N. Rao <naveen.n.rao at linux.vnet.ibm.com>
> > ---
> >  arch/powerpc/kernel/trace/ftrace.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
>
> With this patch my reproducer [1] is passing, thanks!
>
> Tested-by: Ondrej Mosnacek <omosnacek at gmail.com>
>
> [1] https://github.com/ClangBuiltLinux/linux/issues/1682#issue-1330483247

Thanks for the report and fixup. I filed
https://github.com/llvm/llvm-project/issues/57031
as a feature request for -mprofile-kernel in clang.  If there are
other missing features for this target, let's get bugs filed for them.

Acked-by: Nick Desaulniers <ndesaulniers at google.com>
Link: https://github.com/llvm/llvm-project/issues/57031
Link: https://github.com/ClangBuiltLinux/linux/issues/1682

MPE: can you please ensure the above two links get added if/when applying?
-- 
Thanks,
~Nick Desaulniers


More information about the Linuxppc-dev mailing list