powerpc/crash: Fix non-smp kexec preparation
PATCH v2 1/1 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.
---
Changes since v1:
- Use if (IS_ENABLED(CONFIG_SMP)) instead of #ifdef CONFIG_SMP
arch/powerpc/kexec/crash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/powerpc/kexec/crash.c +4 -1
@@ -359,7 +359,10 @@ void default_machine_crash_shutdown(struct pt_regs *regs)if (TRAP (regs) ==INTERRUPT_SYSTEM_RESET ) is_via_system_reset =1 ; -crash_smp_send_stop (); +if (IS_ENABLED (CONFIG_SMP )) +crash_smp_send_stop (); +else +crash_kexec_prepare ();crash_save_cpu (regs, crashing_cpu);
Signature · 1 line
2.43.5
Hi Eddie,
Quoted 5 lines · Eddie James
In non-smp configurations,
crash_kexec_prepareis never called in the crash shutdown path. One result of this is that thecrashing_cpuvariable is never set, preventingcrash_save_cpufrom storing theNT_PRSTATUSelf note in the core dump.
Thanks for fixing this.
Looks good to me.
Quoted 25 lines
Fixes c7255058b543 ("powerpc/crash: save cpu register data in crash_smp_send_stop()")Signed-off-by Eddie James <[email protected]>---
Changes since v1:
- Use if (IS_ENABLED(CONFIG_SMP)) instead of #ifdefCONFIG_SMParch/powerpc/kexec/crash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)arch/powerpc/kexec/crash.c +4
-1@@ -359,7 +359,10 @@ void default_machine_crash_shutdown(struct pt_regs *regs)if (TRAP (regs) ==INTERRUPT_SYSTEM_RESET ) is_via_system_reset =1 ; -crash_smp_send_stop (); +if (IS_ENABLED (CONFIG_SMP )) +crash_smp_send_stop (); +else +crash_kexec_prepare ();crash_save_cpu (regs, crashing_cpu);
Quoted 6 lines · Eddie James
In non-smp configurations,
crash_kexec_prepareis never called in the crash shutdown path. One result of this is that thecrashing_cpuvariable is never set, preventingcrash_save_cpufrom storing theNT_PRSTATUSelf note in the core dump.
Applied to powerpc/next.
[1/1] powerpc/crash: Fix non-smp kexec preparation
https://git.kernel.org/powerpc/c/882b25af265de8e05c66f72b9a29f6047102958f
Thanks