Re: error: implicit declaration of function 'cpu_die'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

   Simon

[1] where I merge the APUS stuff by Roman Zippel -- http://www.psi5.com/~geier/linux-2.6-apus.git
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 */
 

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux