powerpc: Move definitions of secondary CPU spinloop to header file
PATCH 11/20 powerpc: Move definitions of secondary CPU spinloop to header file
Those definitions are currently declared extern in the .c file where they are used, move them to a header file instead.
--
arch/powerpc/include/asm/smp.h | 5 +++++ arch/powerpc/kernel/setup_64.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-)
arch/powerpc/include/asm/smp.h +5 -0
@@ -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__ */
arch/powerpc/kernel/setup_64.c +0 -3
@@ -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;
Quoted 9 lines · Benjamin Herrenschmidt
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 <[email protected]>--
arch/powerpc/include/asm/smp.h | 5 +++++ arch/powerpc/kernel/setup_64.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-)
Can we not get rid of the externs in:
arch/powerpc/platforms/cell/smp.c:extern void generic_secondary_smp_init(unsigned long); arch/powerpc/platforms/pseries/smp.c:extern void generic_secondary_smp_init(unsigned long);
arch/powerpc/kernel/prom_init.c:extern unsigned long __secondary_hold_spinloop;
- k
Quoted 38 lines
---
linux-work.orig/arch/powerpc/include/asm/smp.h2009-07-22
16:38:32.000000000 +1000
+++linux-work/arch/powerpc/include/asm/smp.h2009-07-22
16:46:59.000000000 +1000arch/powerpc/include/asm/smp.h +5
-0@@ -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.c2009-07-22
16:38:12.000000000 +1000
+++linux-work/arch/powerpc/kernel/setup_64.c2009-07-22
16:46:59.000000000 +1000arch/powerpc/kernel/setup_64.c +0
-3@@ -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;_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Quoted 14 lines · Kumar Gala
Quoted 9 lines · Benjamin Herrenschmidt
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 <[email protected]>--
arch/powerpc/include/asm/smp.h | 5 +++++ arch/powerpc/kernel/setup_64.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-)Can we not get rid of the externs in:
Quoted 7 lines
arch/powerpc/platforms/cell/smp.c:extern void
generic_secondary_smp_init(unsigned long);
arch/powerpc/platforms/pseries/smp.c:extern voidgeneric_secondary_smp_init(unsigned long);arch/powerpc/kernel/prom_init.c:extern unsigned long
__secondary_hold_spinloop;
Probably :-) I'll have a look.
Cheers,
Ben.
Quoted 40 lines
- k
Quoted 38 lines
---
linux-work.orig/arch/powerpc/include/asm/smp.h2009-07-22
16:38:32.000000000 +1000
+++linux-work/arch/powerpc/include/asm/smp.h2009-07-22
16:46:59.000000000 +1000arch/powerpc/include/asm/smp.h +5
-0@@ -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.c2009-07-22
16:38:12.000000000 +1000
+++linux-work/arch/powerpc/kernel/setup_64.c2009-07-22
16:46:59.000000000 +1000arch/powerpc/kernel/setup_64.c +0
-3@@ -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;_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev