Commit b987812b authored by Paul Gortmaker's avatar Paul Gortmaker Committed by Benjamin Herrenschmidt

powerpc/kexec: Fix mismatched ifdefs for PPC64/SMP.

Commit b3df895a "powerpc/kexec: Add support for FSL-BookE"
introduced the original PPC_STD_MMU_64 checks around the function
crash_kexec_wait_realmode().   Then commit c2be0548
"powerpc: Fix default_machine_crash_shutdown #ifdef botch" changed
the ifdef around the calling site to add a check on SMP, but the
ifdef around the function itself was left unchanged, leaving an
unused function for PPC_STD_MMU_64=y and SMP=n

Rather than have two ifdefs that can get out of sync like this,
simply put the corrected conditional around the function and use
a stub to get rid of one set of ifdefs completely.
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 83ebb3e3
...@@ -163,7 +163,7 @@ static void crash_kexec_prepare_cpus(int cpu) ...@@ -163,7 +163,7 @@ static void crash_kexec_prepare_cpus(int cpu)
} }
/* wait for all the CPUs to hit real mode but timeout if they don't come in */ /* wait for all the CPUs to hit real mode but timeout if they don't come in */
#ifdef CONFIG_PPC_STD_MMU_64 #if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
static void crash_kexec_wait_realmode(int cpu) static void crash_kexec_wait_realmode(int cpu)
{ {
unsigned int msecs; unsigned int msecs;
...@@ -188,6 +188,8 @@ static void crash_kexec_wait_realmode(int cpu) ...@@ -188,6 +188,8 @@ static void crash_kexec_wait_realmode(int cpu)
} }
mb(); mb();
} }
#else
static inline void crash_kexec_wait_realmode(int cpu) {}
#endif #endif
/* /*
...@@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) ...@@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
crash_save_cpu(regs, crashing_cpu); crash_save_cpu(regs, crashing_cpu);
crash_kexec_prepare_cpus(crashing_cpu); crash_kexec_prepare_cpus(crashing_cpu);
cpu_set(crashing_cpu, cpus_in_crash); cpu_set(crashing_cpu, cpus_in_crash);
#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
crash_kexec_wait_realmode(crashing_cpu); crash_kexec_wait_realmode(crashing_cpu);
#endif
machine_kexec_mask_interrupts(); machine_kexec_mask_interrupts();
......
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