powerpc: Don't use 'struct ppc_inst' to reference instruction location
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 20 May 2021 13:50:45 +0000 (13:50 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Jun 2021 14:09:00 +0000 (00:09 +1000)
commit69d4d6e5fd9f4e805280ad831932c3df7b9d7cc7
tree43fa12d74a15e793166972f23562a01d6f8637e3
parente90a21ea801d1776d9a786ad02354fd3fe23ce09
powerpc: Don't use 'struct ppc_inst' to reference instruction location

'struct ppc_inst' is an internal representation of an instruction, but
in-memory instructions are and will remain a table of 'u32' forever.

Replace all 'struct ppc_inst *' used for locating an instruction in
memory by 'u32 *'. This removes a lot of undue casts to 'struct
ppc_inst *'.

It also helps locating ab-use of 'struct ppc_inst' dereference.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Fix ppc_inst_next(), use u32 instead of unsigned int]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/7062722b087228e42cbd896e39bfdf526d6a340a.1621516826.git.christophe.leroy@csgroup.eu
20 files changed:
arch/powerpc/include/asm/code-patching.h
arch/powerpc/include/asm/inst.h
arch/powerpc/include/asm/uprobes.h
arch/powerpc/kernel/crash_dump.c
arch/powerpc/kernel/epapr_paravirt.c
arch/powerpc/kernel/jump_label.c
arch/powerpc/kernel/kgdb.c
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/mce_power.c
arch/powerpc/kernel/optprobes.c
arch/powerpc/kernel/setup_32.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/mm/maccess.c
arch/powerpc/perf/core-book3s.c
arch/powerpc/platforms/86xx/mpc86xx_smp.c
arch/powerpc/platforms/powermac/smp.c
arch/powerpc/xmon/xmon.c