powerpc/64: Use -mprofile-kernel for big endian ELFv2 kernels
authorNicholas Piggin <npiggin@gmail.com>
Tue, 6 Jun 2023 09:38:31 +0000 (19:38 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 14 Jun 2023 02:46:42 +0000 (12:46 +1000)
commitaec0ba7472a7b0c1c293932e7978197f1489a332
tree27ba6831649a3ce13c23e269f0b8b382cfdecee4
parent8c5fa3b5c4df3d071dab42b04b971df370d99354
powerpc/64: Use -mprofile-kernel for big endian ELFv2 kernels

-mprofile-kernel is an optimised calling convention for mcount that
Linux  has only implemented with the ELFv2 ABI, so it was disabled for
big endian kernels. However it does work with ELFv2 big endian, so let's
allow that if the compiler supports it.

Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230606093832.199712-4-npiggin@gmail.com
arch/powerpc/Kconfig
arch/powerpc/tools/gcc-check-mprofile-kernel.sh