powerpc/64: Add support to build with prefixed instructions
authorNicholas Piggin <npiggin@gmail.com>
Sat, 8 Apr 2023 02:17:49 +0000 (12:17 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Apr 2023 02:54:22 +0000 (12:54 +1000)
commitdc5dac748af9087e9240bd2ae6ae7db48d5360ae
tree59998f55199668c054226f3bc29fc4963fc35741
parentb270bebd34e36fb69363d65e24b00a9d148903e8
powerpc/64: Add support to build with prefixed instructions

Add an option to build kernel and module with prefixed instructions if
the CPU and toolchain support it.

This is not related to kernel support for userspace execution of
prefixed instructions.

Building with prefixed instructions breaks some extended inline asm
memory addressing, for example it will provide immediates that exceed
the range of simple load/store displacement. Whether this is a
toolchain or a kernel asm problem remains to be seen. For now, these
are replaced with simpler and less efficient direct register addressing
when compiling with prefixed.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230408021752.862660-4-npiggin@gmail.com
arch/powerpc/Kconfig
arch/powerpc/Makefile
arch/powerpc/include/asm/atomic.h
arch/powerpc/include/asm/io.h
arch/powerpc/include/asm/uaccess.h
arch/powerpc/kernel/trace/ftrace.c
arch/powerpc/platforms/Kconfig.cputype