]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4375f57d84d94177b8eb58c506989304e07fd65f
tree43fa12d74a15e793166972f23562a01d6f8637e3
parentec39e2ce08ce69edc40a37e32fbc985eab58b432
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