How can I fix this properly?
arch/ppc/kernel/idle.c includes linux/smp.h, which includes asm-smp.h
only if CONFIG_SMP is defined.
As a result, cpu_die remains undefined for non-SMP builds.
The include order was changed recently, as this kernel .config built ok with 2.6.13.
I see cpu_die was introduced recently in include/asm-ppc/smp.h, in 2.6.14-rc1.
CC arch/ppc/kernel/idle.o
arch/ppc/kernel/idle.c: In function 'default_idle':
arch/ppc/kernel/idle.c:58: error: implicit declaration of function 'cpu_die'
make[1]: *** [arch/ppc/kernel/idle.o] Error 1
--
short story of a lazy sysadmin:
alias appserv=wotan
diff --git a/include/asm-ppc/smp.h b/include/asm-ppc/smp.h
--- a/include/asm-ppc/smp.h
+++ b/include/asm-ppc/smp.h
@@ -66,11 +66,7 @@ extern struct klock_info_struct klock_in
#endif /* __ASSEMBLY__ */
-#else /* !(CONFIG_SMP) */
-
-static inline void cpu_die(void) { }
-
-#endif /* !(CONFIG_SMP) */
+#endif /* CONFIG_SMP */
#endif /* !(_PPC_SMP_H) */
#endif /* __KERNEL__ */
diff --git a/include/linux/smp.h b/include/linux/smp.h
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -99,6 +99,7 @@ void smp_prepare_boot_cpu(void);
static inline void smp_send_reschedule(int cpu) { }
#define num_booting_cpus() 1
#define smp_prepare_boot_cpu() do {} while (0)
+static inline void cpu_die(void) { }
#endif /* !SMP */
On Mon, Oct 10, Simon Richter wrote:
> Hi,
>
> >arch/ppc/kernel/idle.c includes linux/smp.h, which includes asm-smp.h
> >only if CONFIG_SMP is defined.
> >As a result, cpu_die remains undefined for non-SMP builds.
>
> I have used the attached patch for my tree[1], but this needs to be
> cross-checked with the other architectures.
Looks good, should go into 2.6.14.
--
short story of a lazy sysadmin:
alias appserv=wotan