Skip to content

Commit 882b25a

Browse files
Eddie Jamesmaddy-kerneldev
authored andcommitted
powerpc/crash: Fix non-smp kexec preparation
In non-smp configurations, crash_kexec_prepare is never called in the crash shutdown path. One result of this is that the crashing_cpu variable is never set, preventing crash_save_cpu from storing the NT_PRSTATUS elf note in the core dump. Fixes: c725505 ("powerpc/crash: save cpu register data in crash_smp_send_stop()") Signed-off-by: Eddie James <[email protected]> Reviewed-by: Hari Bathini <[email protected]> Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 497b779 commit 882b25a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/powerpc/kexec/crash.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,10 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
359359
if (TRAP(regs) == INTERRUPT_SYSTEM_RESET)
360360
is_via_system_reset = 1;
361361

362-
crash_smp_send_stop();
362+
if (IS_ENABLED(CONFIG_SMP))
363+
crash_smp_send_stop();
364+
else
365+
crash_kexec_prepare();
363366

364367
crash_save_cpu(regs, crashing_cpu);
365368

0 commit comments

Comments
 (0)