powerpc: add CFUNC assembly label annotation
authorNicholas Piggin <npiggin@gmail.com>
Sat, 8 Apr 2023 02:17:50 +0000 (12:17 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2023 02:54:24 +0000 (12:54 +1000)
commit4e991e3c16a350d1eeffc100ce3fb25292596d03
tree850fa79b5e450ca0bbb807c42a50cfd54d01f70e
parentdc5dac748af9087e9240bd2ae6ae7db48d5360ae
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
15 files changed:
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/interrupt_64.S
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/vdso/gettimeofday.S
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/lib/copypage_power7.S
arch/powerpc/lib/copyuser_power7.S
arch/powerpc/lib/hweight_64.S
arch/powerpc/lib/memcmp_64.S
arch/powerpc/lib/memcpy_power7.S
arch/powerpc/platforms/pseries/hvCall.S
tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h
tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h