error: implicit declaration of function 'cpu_die'
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.oarch/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
Signature · 2 lines
short story of a lazy sysadmin: alias appserv=wotan
Hi,
Quoted 3 lines
arch/ppc/kernel/idle.cincludeslinux/smp.h, which includesasm-smp.honly ifCONFIG_SMPis defined.
As a result,cpu_dieremains 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.
Simon
[1] where I merge the APUS stuff by Roman Zippel -- http://www.psi5.com/~geier/linux-2.6-apus.git
include/asm-ppc/smp.h +1 -5
@@ -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__ */
include/linux/smp.h +1 -0
@@ -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 */
Quoted 8 lines · Simon Richter
Hi,
Quoted 3 lines
arch/ppc/kernel/idle.cincludeslinux/smp.h, which includesasm-smp.honly ifCONFIG_SMPis defined.
As a result,cpu_dieremains 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.
Signature · 2 lines
short story of a lazy sysadmin: alias appserv=wotan