Skip to content

Commit b987812

Browse files
Paul Gortmakerozbenh
authored andcommitted
powerpc/kexec: Fix mismatched ifdefs for PPC64/SMP.
Commit b3df895 "powerpc/kexec: Add support for FSL-BookE" introduced the original PPC_STD_MMU_64 checks around the function crash_kexec_wait_realmode(). Then commit c2be054 "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: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent 83ebb3e commit b987812

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/powerpc/kernel/crash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static void crash_kexec_prepare_cpus(int cpu)
163163
}
164164

165165
/* wait for all the CPUs to hit real mode but timeout if they don't come in */
166-
#ifdef CONFIG_PPC_STD_MMU_64
166+
#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
167167
static void crash_kexec_wait_realmode(int cpu)
168168
{
169169
unsigned int msecs;
@@ -188,6 +188,8 @@ static void crash_kexec_wait_realmode(int cpu)
188188
}
189189
mb();
190190
}
191+
#else
192+
static inline void crash_kexec_wait_realmode(int cpu) {}
191193
#endif
192194

193195
/*
@@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
344346
crash_save_cpu(regs, crashing_cpu);
345347
crash_kexec_prepare_cpus(crashing_cpu);
346348
cpu_set(crashing_cpu, cpus_in_crash);
347-
#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
348349
crash_kexec_wait_realmode(crashing_cpu);
349-
#endif
350350

351351
machine_kexec_mask_interrupts();
352352

0 commit comments

Comments
 (0)