public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently
@ 2006-08-04  5:35 Greg Banks
  2006-08-04 14:32 ` Zwane Mwaikambo
  2006-08-04 14:45 ` Arjan van de Ven
  0 siblings, 2 replies; 5+ messages in thread
From: Greg Banks @ 2006-08-04  5:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Neil Brown, Linux NFS Mailing List, Linux Kernel Mailing List

cpumask: ensure that the cpu_online_map and cpu_possible_map bitmasks,
and hence all the macros in <linux/cpumask.h> that require them, are
available to modules for all supported combinations of architecture
and CONFIG_SMP.

Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
---

 arch/arm/kernel/smp.c           |    2 ++
 arch/cris/arch-v32/kernel/smp.c |    1 +
 arch/sh/kernel/smp.c            |    1 +
 kernel/sched.c                  |    3 +++
 4 files changed, 7 insertions(+)

Index: linux-2.6.18-rc2/kernel/sched.c
===================================================================
--- linux-2.6.18-rc2.orig/kernel/sched.c	2006-08-01 17:53:25.000000000 +1000
+++ linux-2.6.18-rc2/kernel/sched.c	2006-08-02 23:01:20.535457863 +1000
@@ -4348,7 +4348,10 @@ EXPORT_SYMBOL(cpu_present_map);
 
 #ifndef CONFIG_SMP
 cpumask_t cpu_online_map __read_mostly = CPU_MASK_ALL;
+EXPORT_SYMBOL_GPL(cpu_online_map);
+
 cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL;
+EXPORT_SYMBOL_GPL(cpu_possible_map);
 #endif
 
 long sched_getaffinity(pid_t pid, cpumask_t *mask)
Index: linux-2.6.18-rc2/arch/arm/kernel/smp.c
===================================================================
--- linux-2.6.18-rc2.orig/arch/arm/kernel/smp.c	2006-07-16 07:53:08.000000000 +1000
+++ linux-2.6.18-rc2/arch/arm/kernel/smp.c	2006-08-02 23:16:11.014268293 +1000
@@ -36,7 +36,9 @@
  * The online bitmask indicates that the CPU is up and running.
  */
 cpumask_t cpu_possible_map;
+EXPORT_SYMBOL(cpu_possible_map);
 cpumask_t cpu_online_map;
+EXPORT_SYMBOL(cpu_online_map);
 
 /*
  * as from 2.5, kernels no longer have an init_tasks structure
Index: linux-2.6.18-rc2/arch/cris/arch-v32/kernel/smp.c
===================================================================
--- linux-2.6.18-rc2.orig/arch/cris/arch-v32/kernel/smp.c	2006-07-16 07:53:08.000000000 +1000
+++ linux-2.6.18-rc2/arch/cris/arch-v32/kernel/smp.c	2006-08-02 23:26:25.253636007 +1000
@@ -28,6 +28,7 @@ spinlock_t cris_atomic_locks[] = { [0 ..
 
 /* CPU masks */
 cpumask_t cpu_online_map = CPU_MASK_NONE;
+EXPORT_SYMBOL(cpu_online_map);
 cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
 EXPORT_SYMBOL(phys_cpu_present_map);
 
Index: linux-2.6.18-rc2/arch/sh/kernel/smp.c
===================================================================
--- linux-2.6.18-rc2.orig/arch/sh/kernel/smp.c	2006-07-16 07:53:08.000000000 +1000
+++ linux-2.6.18-rc2/arch/sh/kernel/smp.c	2006-08-02 23:23:34.284064085 +1000
@@ -42,6 +42,7 @@ cpumask_t cpu_possible_map;
 EXPORT_SYMBOL(cpu_possible_map);
 
 cpumask_t cpu_online_map;
+EXPORT_SYMBOL(cpu_online_map);
 static atomic_t cpus_booted = ATOMIC_INIT(0);
 
 /* These are defined by the board-specific code. */

-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.



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

* Re: PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently
  2006-08-04  5:35 PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently Greg Banks
@ 2006-08-04 14:32 ` Zwane Mwaikambo
  2006-08-07  3:05   ` Greg Banks
  2006-08-04 14:45 ` Arjan van de Ven
  1 sibling, 1 reply; 5+ messages in thread
From: Zwane Mwaikambo @ 2006-08-04 14:32 UTC (permalink / raw)
  To: Greg Banks
  Cc: Andrew Morton, Neil Brown, Linux NFS Mailing List,
	Linux Kernel Mailing List

On Fri, 4 Aug 2006, Greg Banks wrote:

> cpumask: ensure that the cpu_online_map and cpu_possible_map bitmasks,
> and hence all the macros in <linux/cpumask.h> that require them, are
> available to modules for all supported combinations of architecture
> and CONFIG_SMP.
> 
> Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
> ---
> 
>  arch/arm/kernel/smp.c           |    2 ++
>  arch/cris/arch-v32/kernel/smp.c |    1 +
>  arch/sh/kernel/smp.c            |    1 +
>  kernel/sched.c                  |    3 +++
>  4 files changed, 7 insertions(+)
> 
> Index: linux-2.6.18-rc2/kernel/sched.c
> ===================================================================
> --- linux-2.6.18-rc2.orig/kernel/sched.c	2006-08-01 17:53:25.000000000 +1000
> +++ linux-2.6.18-rc2/kernel/sched.c	2006-08-02 23:01:20.535457863 +1000
> @@ -4348,7 +4348,10 @@ EXPORT_SYMBOL(cpu_present_map);
>  
>  #ifndef CONFIG_SMP
>  cpumask_t cpu_online_map __read_mostly = CPU_MASK_ALL;
> +EXPORT_SYMBOL_GPL(cpu_online_map);

>  cpumask_t cpu_possible_map;
> +EXPORT_SYMBOL(cpu_possible_map);
>  cpumask_t cpu_online_map;
> +EXPORT_SYMBOL(cpu_online_map);

How come these are of different export types?

Cheers,
	Zwane


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

* Re: PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently
  2006-08-04  5:35 PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently Greg Banks
  2006-08-04 14:32 ` Zwane Mwaikambo
@ 2006-08-04 14:45 ` Arjan van de Ven
  2006-08-07  2:57   ` Greg Banks
  1 sibling, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2006-08-04 14:45 UTC (permalink / raw)
  To: Greg Banks
  Cc: Andrew Morton, Neil Brown, Linux NFS Mailing List,
	Linux Kernel Mailing List

Greg Banks wrote:
> cpumask: ensure that the cpu_online_map and cpu_possible_map bitmasks,
> and hence all the macros in <linux/cpumask.h> that require them, are
> available to modules for all supported combinations of architecture
> and CONFIG_SMP.

Are there any actual users of this?

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

* Re: PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently
  2006-08-04 14:45 ` Arjan van de Ven
@ 2006-08-07  2:57   ` Greg Banks
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Banks @ 2006-08-07  2:57 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: Andrew Morton, Neil Brown, Linux NFS Mailing List,
	Linux Kernel Mailing List

On Sat, 2006-08-05 at 00:45, Arjan van de Ven wrote:
> Greg Banks wrote:
> > cpumask: ensure that the cpu_online_map and cpu_possible_map bitmasks,
> > and hence all the macros in <linux/cpumask.h> that require them, are
> > available to modules for all supported combinations of architecture
> > and CONFIG_SMP.
> 
> Are there any actual users of this?

knfsd-make-rpc-threads-pools-numa-aware.patch in -mm.

http://marc.theaimsgroup.com/?l=linux-kernel&m=115430697330586&w=2

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.



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

* Re: PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently
  2006-08-04 14:32 ` Zwane Mwaikambo
@ 2006-08-07  3:05   ` Greg Banks
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Banks @ 2006-08-07  3:05 UTC (permalink / raw)
  To: Zwane Mwaikambo
  Cc: Andrew Morton, Neil Brown, Linux NFS Mailing List,
	Linux Kernel Mailing List

On Sat, 2006-08-05 at 00:32, Zwane Mwaikambo wrote:
> On Fri, 4 Aug 2006, Greg Banks wrote:
> 
> > cpumask: ensure that the cpu_online_map and cpu_possible_map bitmasks,
> > and hence all the macros in <linux/cpumask.h> that require them, are
> > available to modules for all supported combinations of architecture
> > and CONFIG_SMP.
> > 
> > Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
> > ---
> > 
> >  arch/arm/kernel/smp.c           |    2 ++
> >  arch/cris/arch-v32/kernel/smp.c |    1 +
> >  arch/sh/kernel/smp.c            |    1 +
> >  kernel/sched.c                  |    3 +++
> >  4 files changed, 7 insertions(+)
> > 
> > Index: linux-2.6.18-rc2/kernel/sched.c
> > ===================================================================
> > --- linux-2.6.18-rc2.orig/kernel/sched.c	2006-08-01 17:53:25.000000000 +1000
> > +++ linux-2.6.18-rc2/kernel/sched.c	2006-08-02 23:01:20.535457863 +1000
> > @@ -4348,7 +4348,10 @@ EXPORT_SYMBOL(cpu_present_map);
> >  
> >  #ifndef CONFIG_SMP
> >  cpumask_t cpu_online_map __read_mostly = CPU_MASK_ALL;
> > +EXPORT_SYMBOL_GPL(cpu_online_map);
> 
> >  cpumask_t cpu_possible_map;
> > +EXPORT_SYMBOL(cpu_possible_map);
> >  cpumask_t cpu_online_map;
> > +EXPORT_SYMBOL(cpu_online_map);
> 
> How come these are of different export types?

Because I screwed up.  Fix coming later.  I presume _GPL
is the favoured form?

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.



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

end of thread, other threads:[~2006-08-07  3:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-04  5:35 PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently Greg Banks
2006-08-04 14:32 ` Zwane Mwaikambo
2006-08-07  3:05   ` Greg Banks
2006-08-04 14:45 ` Arjan van de Ven
2006-08-07  2:57   ` Greg Banks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox