summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2023-04-08 12:17:49 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-17 15:21:24 +0200
commit9eb76d5168c10a46647df5514acc863039a44885 (patch)
treef9ba3cad50dd32c418349072b19660ae2f3f038b /arch/powerpc/kernel
parent8b9f7d8d71bf9b91ad4cb1ff589d7cdf4bc0673a (diff)
downloadlinux-9eb76d5168c10a46647df5514acc863039a44885.tar.gz
linux-9eb76d5168c10a46647df5514acc863039a44885.tar.bz2
linux-9eb76d5168c10a46647df5514acc863039a44885.zip
powerpc/64: Add support to build with prefixed instructions
[ Upstream commit dc5dac748af9087e9240bd2ae6ae7db48d5360ae ] 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 Stable-dep-of: 39190ac7cff1 ("powerpc/atomic: Use YZ constraints for DS-form instructions") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/trace/ftrace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c
index 7b85c3b460a3..72864fb7a6cc 100644
--- a/arch/powerpc/kernel/trace/ftrace.c
+++ b/arch/powerpc/kernel/trace/ftrace.c
@@ -194,6 +194,8 @@ __ftrace_make_nop(struct module *mod,
* get corrupted.
*
* Use a b +8 to jump over the load.
+ * XXX: could make PCREL depend on MPROFILE_KERNEL
+ * XXX: check PCREL && MPROFILE_KERNEL calling sequence
*/
if (IS_ENABLED(CONFIG_MPROFILE_KERNEL) || IS_ENABLED(CONFIG_PPC32))
pop = ppc_inst(PPC_RAW_NOP());