linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/20] powerpc: Move definitions of secondary CPU spinloop to header file
@ 2009-07-23  5:59 Benjamin Herrenschmidt
  2009-07-23 14:51 ` Kumar Gala
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2009-07-23  5:59 UTC (permalink / raw)
  To: linuxppc-dev

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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 11/20] powerpc: Move definitions of secondary CPU spinloop to header file
  2009-07-23  5:59 [PATCH 11/20] powerpc: Move definitions of secondary CPU spinloop to header file Benjamin Herrenschmidt
@ 2009-07-23 14:51 ` Kumar Gala
  2009-07-23 22:11   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2009-07-23 14:51 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev


On Jul 23, 2009, at 12:59 AM, Benjamin Herrenschmidt wrote:

> 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(-)

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

>
>
> --- 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;
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 11/20] powerpc: Move definitions of secondary CPU spinloop to header file
  2009-07-23 14:51 ` Kumar Gala
@ 2009-07-23 22:11   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2009-07-23 22:11 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

On Thu, 2009-07-23 at 09:51 -0500, Kumar Gala wrote:
> On Jul 23, 2009, at 12:59 AM, Benjamin Herrenschmidt wrote:
> 
> > 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(-)
> 
> 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;

Probably :-) I'll have a look.

Cheers,
Ben.

> - k
> 
> >
> >
> > --- 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;
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-23 22:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-23  5:59 [PATCH 11/20] powerpc: Move definitions of secondary CPU spinloop to header file Benjamin Herrenschmidt
2009-07-23 14:51 ` Kumar Gala
2009-07-23 22:11   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).