Commit 7b090b6f authored by Hari Bathini's avatar Hari Bathini Committed by Michael Ellerman

powerpc/85xx: fix compile error without CONFIG_CRASH_DUMP

Since commit 5c4233cc ("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: 5c4233cc ("powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency")
Cc: stable@vger.kernel.org # v6.9+
Reported-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
Closes: https://lore.kernel.org/all/fa247ae4-5825-4dbe-a737-d93b7ab4d4b9@xenosoft.de/Suggested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarHari Bathini <hbathini@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240510080757.560159-1-hbathini@linux.ibm.com
parent 9dc14078
...@@ -398,6 +398,7 @@ static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary) ...@@ -398,6 +398,7 @@ static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
hard_irq_disable(); hard_irq_disable();
mpic_teardown_this_cpu(secondary); mpic_teardown_this_cpu(secondary);
#ifdef CONFIG_CRASH_DUMP
if (cpu == crashing_cpu && cpu_thread_in_core(cpu) != 0) { if (cpu == crashing_cpu && cpu_thread_in_core(cpu) != 0) {
/* /*
* We enter the crash kernel on whatever cpu crashed, * 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) ...@@ -406,9 +407,11 @@ static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
*/ */
disable_threadbit = 1; disable_threadbit = 1;
disable_cpu = cpu_first_thread_sibling(cpu); disable_cpu = cpu_first_thread_sibling(cpu);
} else if (sibling != crashing_cpu && } else if (sibling == crashing_cpu) {
cpu_thread_in_core(cpu) == 0 && return;
cpu_thread_in_core(sibling) != 0) { }
#endif
if (cpu_thread_in_core(cpu) == 0 && cpu_thread_in_core(sibling) != 0) {
disable_threadbit = 2; disable_threadbit = 2;
disable_cpu = sibling; disable_cpu = sibling;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment