Commit 7c7a81b5 authored by Paul Gortmaker's avatar Paul Gortmaker Committed by Benjamin Herrenschmidt

powerpc/kexec: Fix regression causing compile failure on UP

Recent commit b987812b caused
a compile failure on UP because a considerably large block
of the file was included within CONFIG_SMP, hence making a stub
function not exposed on UP builds when it needed to be.

Relocate the stub to the #else /* ! CONFIG_SMP */ section
and also annotate the relevant else/endif so that nobody
else falls into the same trap I did.
Reported-by: default avatarMichael Guntsche <mike@it-loops.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 8f3dda75
...@@ -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 */
#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) #ifdef CONFIG_PPC_STD_MMU_64
static void crash_kexec_wait_realmode(int cpu) static void crash_kexec_wait_realmode(int cpu)
{ {
unsigned int msecs; unsigned int msecs;
...@@ -188,9 +188,7 @@ static void crash_kexec_wait_realmode(int cpu) ...@@ -188,9 +188,7 @@ static void crash_kexec_wait_realmode(int cpu)
} }
mb(); mb();
} }
#else #endif /* CONFIG_PPC_STD_MMU_64 */
static inline void crash_kexec_wait_realmode(int cpu) {}
#endif
/* /*
* This function will be called by secondary cpus or by kexec cpu * This function will be called by secondary cpus or by kexec cpu
...@@ -235,7 +233,9 @@ void crash_kexec_secondary(struct pt_regs *regs) ...@@ -235,7 +233,9 @@ void crash_kexec_secondary(struct pt_regs *regs)
crash_ipi_callback(regs); crash_ipi_callback(regs);
} }
#else #else /* ! CONFIG_SMP */
static inline void crash_kexec_wait_realmode(int cpu) {}
static void crash_kexec_prepare_cpus(int cpu) static void crash_kexec_prepare_cpus(int cpu)
{ {
/* /*
...@@ -255,7 +255,7 @@ void crash_kexec_secondary(struct pt_regs *regs) ...@@ -255,7 +255,7 @@ void crash_kexec_secondary(struct pt_regs *regs)
{ {
cpus_in_sr = CPU_MASK_NONE; cpus_in_sr = CPU_MASK_NONE;
} }
#endif #endif /* CONFIG_SMP */
/* /*
* Register a function to be called on shutdown. Only use this if you * Register a function to be called on shutdown. Only use this if you
......
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