# \[PATCH 11/20\] powerpc: Move definitions of secondary CPU spinloop to header file

- From: Benjamin Herrenschmidt \<benh@kernel.crashing.org\>
- Date: 2009-07-23 05:59:57 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2009/07/9454482
- Thread: https://ratatoskr.run/linuxppc-dev/2009/07/9454482/t.md

```text
Those definitions are currently declared extern in the .c file where
they are used, move them to a header file instead.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
--

 arch/powerpc/include/asm/smp.h |    5 +++++
 arch/powerpc/kernel/setup_64.c |    3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

--- linux-work.orig/arch/powerpc/include/asm/smp.h	2009-07-22 16:38:32.000000000 +1000
+++ linux-work/arch/powerpc/include/asm/smp.h	2009-07-22 16:46:59.000000000 +1000
@@ -148,6 +148,11 @@ extern struct smp_ops_t *smp_ops;
 extern void arch_send_call_function_single_ipi(int cpu);
 extern void arch_send_call_function_ipi(cpumask_t mask);
 
+#ifdef CONFIG_PPC64
+extern void generic_secondary_smp_init(void);
+extern unsigned long __secondary_hold_spinloop;
+#endif /* CONFIG_PPC64 */
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: linux-work/arch/powerpc/kernel/setup_64.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/setup_64.c	2009-07-22 16:38:12.000000000 +1000
+++ linux-work/arch/powerpc/kernel/setup_64.c	2009-07-22 16:46:59.000000000 +1000
@@ -230,9 +230,6 @@ void early_setup_secondary(void)
 #endif /* CONFIG_SMP */
 
 #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
-extern unsigned long __secondary_hold_spinloop;
-extern void generic_secondary_smp_init(void);
-
 void smp_release_cpus(void)
 {
 	unsigned long *ptr;
```
