Skip to content

[clang][PPC] support for -mprofile-kernel #57031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nickdesaulniers opened this issue Aug 9, 2022 · 14 comments · Fixed by #92997
Closed

[clang][PPC] support for -mprofile-kernel #57031

nickdesaulniers opened this issue Aug 9, 2022 · 14 comments · Fixed by #92997

Comments

@nickdesaulniers
Copy link
Member

From an LKML thread, it seems like the Linux kernel makes use of -mprofile-kernel.
https://lore.kernel.org/llvm/[email protected]/
cc @nemanjai @nemanja-ibm

@llvmbot
Copy link
Member

llvmbot commented Aug 9, 2022

@llvm/issue-subscribers-backend-powerpc

@nickdesaulniers
Copy link
Member Author

This script is what's used to feature test for this flag.

@nickdesaulniers nickdesaulniers changed the title [clang] support for -mprofile-kernel [clang][PPC] support for -mprofile-kernel Aug 9, 2022
@nemanjai
Copy link
Member

nemanjai commented Aug 9, 2022

So this is specific to PowerPC? I suppose only the kernel build on PowerPC uses it so that is why this is specific to PowerPC but Clang doesn't support it on any architecture.
Do you happen to have the documentation from GCC for what this option does? It doesn't seem to come up in my searches in the GCC 11.2.0 manual nor in my searches on Google.
If this is an undocumented GCC option, then we can't really implement it in Clang and we need to find a documented alternative for the kernel build.

@nickdesaulniers
Copy link
Member Author

In the Linux kernel sources, I only see references to -mprofile-kernel in the PPC port.

If this is an undocumented GCC option
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65372

From that bug, the command line help text prints:

Call mcount for profiling before a function prologue

https://kamaleshbabulal.wordpress.com/2016/02/22/linux-kernel-livepatch-mprofile-kernel/ has some more info.

I'm guessing it's easy to find what it's doing in godbolt. Seems like it needs -pg do call _mcount, and is only supported on 64b targets. https://godbolt.org/z/37ooxnh3P

mpe pushed a commit to linuxppc/linux-ci that referenced this issue Aug 10, 2022
Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
@rnav
Copy link

rnav commented Aug 10, 2022

It is unfortunate that -mprofile-kernel is still not documented, but we rely on it heavily for a lot of the ftrace features, including kernel live patching. I doubt the kernel gets much coverage for the older mcount ABI for ppc64le.

From the kernel perspective, -mprofile-kernel largely boils down to the two instruction sequence mflr r0; bl _mcount emitted at function entry, after the optional two-instruction sequence for TOC setup.

Not to replace documentation, but another good reference for this is the writeup from Michael Ellerman:
https://mpe.github.io/posts/2016/05/23/kernel-live-patching-for-ppc64le/

@MaskRay
Copy link
Member

MaskRay commented Aug 11, 2022

I am unsure whether we need to add more variants for mcount. GCC's PowerPC port has some support for -fpatchable-function-entry= now: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99888 This is the new way for live patching IIUC.

ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 15, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 16, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 16, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Aug 16, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux/linux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Aug 16, 2022
commit cb928ac upstream.

Clang doesn't support -mprofile-kernel ABI, so guard the checks against
CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.

Fixes: 23b44fc ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
Cc: [email protected] # v5.19+
Reported-by: Nick Desaulniers <[email protected]>
Reported-by: Ondrej Mosnacek <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Tested-by: Ondrej Mosnacek <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: llvm/llvm-project#57031
Link: ClangBuiltLinux#1682
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
chenzheng1030 pushed a commit to chenzheng1030/llvm-project that referenced this issue May 22, 2024
For now only PPC big endian Linux is supported.
PPC little endian Linux has XRAY support for 64-bit.
PPC AIX has different patchable function entry implementations.

Fixes llvm#63220
Fixes llvm#57031
@chenzheng1030
Copy link
Collaborator

#92997 is created for this issue. I don't have a ppc/ppc64 server to check the end-to-end functionality of the patchable function entry. For now, the code generation is like other platforms, like X86/RISCV on Linux. If any issue found in the compiler code generation, please let me know.

chenzheng1030 pushed a commit to chenzheng1030/llvm-project that referenced this issue May 23, 2024
For now only PPC big endian Linux is supported.
PPC little endian Linux has XRAY support for 64-bit.
PPC AIX has different patchable function entry implementations.

Fixes llvm#63220
Fixes llvm#57031
chenzheng1030 pushed a commit to chenzheng1030/llvm-project that referenced this issue May 24, 2024
For now only PPC big endian Linux is supported.
PPC little endian Linux has XRAY support for 64-bit.
PPC AIX has different patchable function entry implementations.

Fixes llvm#63220
Fixes llvm#57031
rnav added a commit to rnav/linux that referenced this issue Jul 3, 2024
…chain

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

Reported-by: Mahesh Salgaonkar <[email protected]>
Signed-off-by: Naveen N Rao <[email protected]>
rnav added a commit to rnav/linux that referenced this issue Jul 11, 2024
…chain

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

Reported-by: Mahesh Salgaonkar <[email protected]>
Signed-off-by: Naveen N Rao <[email protected]>
rnav added a commit to rnav/linux that referenced this issue Jul 11, 2024
…chain

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

Reported-by: Mahesh Salgaonkar <[email protected]>
Signed-off-by: Naveen N Rao <[email protected]>
rnav added a commit to rnav/linux that referenced this issue Jul 14, 2024
…chain

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]>
kernel-patches-daemon-bpf bot pushed a commit to kernel-patches/bpf that referenced this issue Jul 14, 2024
…chain

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]>
kernel-patches-daemon-bpf-rc bot pushed a commit to kernel-patches/bpf-rc that referenced this issue Jul 14, 2024
…chain

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]>
yuxuanchen1997 pushed a commit that referenced this issue Jul 25, 2024
For now only PPC big endian Linux 32 and 64 bit are supported.

PPC little endian Linux has XRAY support for 64-bit.
PPC AIX has different patchable function entry implementations.

Fixes #63220
Fixes #57031
hbathini pushed a commit to hbathini/linux that referenced this issue Aug 19, 2024
…chain

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]>
kernel-patches-daemon-bpf-rc bot pushed a commit to kernel-patches/bpf-rc that referenced this issue Sep 15, 2024
…chain

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]>
kernel-patches-daemon-bpf bot pushed a commit to kernel-patches/bpf that referenced this issue Sep 15, 2024
…chain

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]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Sep 15, 2024
…chain

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]>
chantra pushed a commit to chantra/kernel-patches-bpf that referenced this issue Sep 15, 2024
…chain

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]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Oct 18, 2024
…chain

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]>
kernel-patches-daemon-bpf-rc bot pushed a commit to kernel-patches/bpf-rc that referenced this issue Oct 18, 2024
…chain

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]>
kernel-patches-daemon-bpf bot pushed a commit to kernel-patches/bpf that referenced this issue Oct 18, 2024
…chain

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]>
kernel-patches-daemon-bpf-rc bot pushed a commit to kernel-patches/bpf-rc that referenced this issue Oct 18, 2024
…chain

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]>
kernel-patches-daemon-bpf bot pushed a commit to kernel-patches/bpf that referenced this issue Oct 18, 2024
…chain

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]>
mpe pushed a commit to linuxppc/linux-ci that referenced this issue Oct 22, 2024
…chain

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]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://patch.msgid.link/[email protected]
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Oct 30, 2024
…chain

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]>
mpe pushed a commit to linuxppc/linux-ci that referenced this issue Oct 31, 2024
…chain

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]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants