Skip to content

Commit 7b090b6

Browse files
hbathinimpe
authored andcommitted
powerpc/85xx: fix compile error without CONFIG_CRASH_DUMP
Since commit 5c4233c ("powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency"), crashing_cpu is not available without CONFIG_CRASH_DUMP. Fix compile error on 64-BIT 85xx owing to this change. Fixes: 5c4233c ("powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency") Cc: [email protected] # v6.9+ Reported-by: Christian Zigotzky <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Hari Bathini <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent 9dc1407 commit 7b090b6

File tree

1 file changed

+6
-3
lines changed
  • arch/powerpc/platforms/85xx

1 file changed

+6
-3
lines changed

arch/powerpc/platforms/85xx/smp.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
398398
hard_irq_disable();
399399
mpic_teardown_this_cpu(secondary);
400400

401+
#ifdef CONFIG_CRASH_DUMP
401402
if (cpu == crashing_cpu && cpu_thread_in_core(cpu) != 0) {
402403
/*
403404
* We enter the crash kernel on whatever cpu crashed,
@@ -406,9 +407,11 @@ static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
406407
*/
407408
disable_threadbit = 1;
408409
disable_cpu = cpu_first_thread_sibling(cpu);
409-
} else if (sibling != crashing_cpu &&
410-
cpu_thread_in_core(cpu) == 0 &&
411-
cpu_thread_in_core(sibling) != 0) {
410+
} else if (sibling == crashing_cpu) {
411+
return;
412+
}
413+
#endif
414+
if (cpu_thread_in_core(cpu) == 0 && cpu_thread_in_core(sibling) != 0) {
412415
disable_threadbit = 2;
413416
disable_cpu = sibling;
414417
}

0 commit comments

Comments
 (0)