summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/crash_dump.c
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2020-05-15 12:12:55 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-05-19 00:10:39 +1000
commit650b55b707fdfa764e9f2b81314d3eb4216fb962 (patch)
tree33027daca271c94467f02d17945afc0517929171 /arch/powerpc/kernel/crash_dump.c
parent7a8818e0df5c6b53c89c7c928498668a2bbb3de0 (diff)
downloadlinux-650b55b707fdfa764e9f2b81314d3eb4216fb962.tar.bz2
powerpc: Add prefixed instructions to instruction data type
For powerpc64, redefine the ppc_inst type so both word and prefixed instructions can be represented. On powerpc32 the type will remain the same. Update places which had assumed instructions to be 4 bytes long. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> [mpe: Rework the get_user_inst() macros to be parameterised, and don't assign to the dest if an error occurred. Use CONFIG_PPC64 not __powerpc64__ in a few places. Address other comments from Christophe. Fix some sparse complaints.] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200506034050.24806-24-jniethe5@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/crash_dump.c')
-rw-r--r--arch/powerpc/kernel/crash_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 72bafb47e757..735e89337398 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -46,7 +46,7 @@ static void __init create_trampoline(unsigned long addr)
* two instructions it doesn't require any registers.
*/
patch_instruction(p, ppc_inst(PPC_INST_NOP));
- patch_branch(++p, addr + PHYSICAL_START, 0);
+ patch_branch((void *)p + 4, addr + PHYSICAL_START, 0);
}
void __init setup_kdump_trampoline(void)