PATCH 2 of 4] cpumask: export cpu_online_map and cpu_possible_map consistently
Subsystems (4)
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.
---
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(+)
kernel/sched.c +3 -0
@@ -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)
arch/arm/kernel/smp.c +2 -0
@@ -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
arch/cris/arch-v32/kernel/smp.c +1 -0
@@ -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);
arch/sh/kernel/smp.c +1 -0
@@ -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. */
Signature · 13 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 19 lines · Greg Banks
cpumask: ensure that the
cpu_online_mapandcpu_possible_mapbitmasks, and hence all the macros in <linux/cpumask.h> that require them, are available to modules for all supported combinations of architecture andCONFIG_SMP.Signed-off-by Greg Banks <[email protected]>---
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
===================================================================
kernel/sched.c EXPORT_SYMBOL(cpu_present_map); · line 4356
Quoted 9 lines
kernel/sched.c +3
-0@@ -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
Quoted 26 lines · Zwane Mwaikambo
Quoted 23 lines · Greg Banks
cpumask: ensure that the
cpu_online_mapandcpu_possible_mapbitmasks, and hence all the macros in <linux/cpumask.h> that require them, are available to modules for all supported combinations of architecture andCONFIG_SMP.Signed-off-by Greg Banks <[email protected]>---
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
===================================================================kernel/sched.c +1
-0@@ -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);
Quoted 6 lines
kernel/sched.c EXPORT_SYMBOL(cpu_present_map); · line 4355
Quoted 4 lines
kernel/sched.c +2
-0cpumask_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.
Signature · 13 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 4 lines · Greg Banks
cpumask: ensure that the
cpu_online_mapandcpu_possible_mapbitmasks, and hence all the macros in <linux/cpumask.h> that require them, are available to modules for all supported combinations of architecture andCONFIG_SMP.
Are there any actual users of this?
Quoted 7 lines · Arjan van de Ven
Quoted 4 lines · Greg Banks
cpumask: ensure that the
cpu_online_mapandcpu_possible_mapbitmasks, and hence all the macros in <linux/cpumask.h> that require them, are available to modules for all supported combinations of architecture andCONFIG_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.
Signature · 13 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NFS maillist - [email protected] https://lists.sourceforge.net/lists/listinfo/nfs