diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-04-08 12:17:50 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-04-20 12:54:24 +1000 |
commit | 4e991e3c16a350d1eeffc100ce3fb25292596d03 (patch) | |
tree | 850fa79b5e450ca0bbb807c42a50cfd54d01f70e /arch/powerpc/include/asm/ppc_asm.h | |
parent | dc5dac748af9087e9240bd2ae6ae7db48d5360ae (diff) |
powerpc: add CFUNC assembly label annotation
This macro is to be used in assembly where C functions are called.
pcrel addressing mode requires branches to functions with a
localentry value of 1 to have either a trailing nop or @notoc.
This macro permits the latter without changing callers.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Add dummy definitions to fix selftests build]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230408021752.862660-5-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/include/asm/ppc_asm.h')
-rw-r--r-- | arch/powerpc/include/asm/ppc_asm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index 1f1a64b780e3..f08b7990a69d 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h @@ -181,6 +181,11 @@ #ifdef __KERNEL__ /* + * Used to name C functions called from asm + */ +#define CFUNC(name) name + +/* * We use __powerpc64__ here because we want the compat VDSO to use the 32-bit * version below in the else case of the ifdef. */ |