powerpc: Use a function for reading instructions
authorJordan Niethe <jniethe5@gmail.com>
Wed, 6 May 2020 03:40:32 +0000 (13:40 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 May 2020 14:10:37 +0000 (00:10 +1000)
commitf8faaffaa7d99028e457ef2d1dcb43a98f736938
tree0e987e7b6862e3412816dec98b222f036931cdc8
parent94afd069d937d84fb4f696eb9a78db4084e43d21
powerpc: Use a function for reading instructions

Prefixed instructions will mean there are instructions of different
length. As a result dereferencing a pointer to an instruction will not
necessarily give the desired result. Introduce a function for reading
instructions from memory into the instruction data type.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
Link: https://lore.kernel.org/r/20200506034050.24806-13-jniethe5@gmail.com
arch/powerpc/include/asm/inst.h
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/mce_power.c
arch/powerpc/kernel/optprobes.c
arch/powerpc/kernel/trace/ftrace.c
arch/powerpc/kernel/uprobes.c
arch/powerpc/lib/code-patching.c
arch/powerpc/lib/feature-fixups.c
arch/powerpc/xmon/xmon.c