linux/arch/powerpc
Michael Ellerman 16ef9767e4 powerpc: Add ppc_inst_as_u64()
The code patching code wants to get the value of a struct ppc_inst as
a u64 when the instruction is prefixed, so we can pass the u64 down to
__put_user_asm() and write it with a single store.

The optprobes code wants to load a struct ppc_inst as an immediate
into a register so it is useful to have it as a u64 to use the
existing helper function.

Currently this is a bit awkward because the value differs based on the
CPU endianness, so add a helper to do the conversion.

This fixes the usage in arch_prepare_optimized_kprobe() which was
previously incorrect on big endian.

Fixes: 650b55b707 ("powerpc: Add prefixed instructions to instruction data type")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Jordan Niethe <jniethe5@gmail.com>
Link: https://lore.kernel.org/r/20200526072630.2487363-1-mpe@ellerman.id.au
2020-05-26 23:36:57 +10:00
..
boot
configs
crypto
include powerpc: Add ppc_inst_as_u64() 2020-05-26 23:36:57 +10:00
kernel powerpc: Add ppc_inst_as_u64() 2020-05-26 23:36:57 +10:00
kexec
kvm
lib powerpc: Add ppc_inst_as_u64() 2020-05-26 23:36:57 +10:00
math-emu
mm Merge branch 'fixes' into next 2020-05-26 22:56:03 +10:00
net
oprofile
perf powerpc/8xx: Remove now unused TLB miss functions 2020-05-26 22:22:22 +10:00
platforms Merge branch 'fixes' into next 2020-05-26 22:56:03 +10:00
purgatory
sysdev Merge "Use hugepages to map kernel mem on 8xx" into next 2020-05-26 22:54:27 +10:00
tools
xmon powerpc: Add ppc_inst_next() 2020-05-26 23:36:51 +10:00
Kbuild
Kconfig Merge branch 'fixes' into next 2020-05-26 22:56:03 +10:00
Kconfig.debug
Makefile
Makefile.postlink