diff options
author | Greg Banks <gnb@melbourne.sgi.com> | 2006-10-02 05:17:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:17 -0400 |
commit | e16b38f71322efd8a221f64b6ddc0748d21d2e1a (patch) | |
tree | da1932ba711a23fbbdf09d8c8cc8dbb02b1190d1 | |
parent | 0f532f3861d2c4e5aa7dcd33fb18e9975eb28457 (diff) |
[PATCH] cpumask: export cpu_online_map and cpu_possible_map consistently
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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/arm/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/smp.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/smp.c | 1 | ||||
-rw-r--r-- | kernel/sched.c | 3 |
4 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 68e9634d260a..421329f5e18e 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -36,7 +36,9 @@ | |||
36 | * The online bitmask indicates that the CPU is up and running. | 36 | * The online bitmask indicates that the CPU is up and running. |
37 | */ | 37 | */ |
38 | cpumask_t cpu_possible_map; | 38 | cpumask_t cpu_possible_map; |
39 | EXPORT_SYMBOL(cpu_possible_map); | ||
39 | cpumask_t cpu_online_map; | 40 | cpumask_t cpu_online_map; |
41 | EXPORT_SYMBOL(cpu_online_map); | ||
40 | 42 | ||
41 | /* | 43 | /* |
42 | * as from 2.5, kernels no longer have an init_tasks structure | 44 | * as from 2.5, kernels no longer have an init_tasks structure |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 464ecaec3bc0..2d0023f2d49b 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -28,6 +28,7 @@ spinlock_t cris_atomic_locks[] = { [0 ... LOCK_COUNT - 1] = SPIN_LOCK_UNLOCKED}; | |||
28 | 28 | ||
29 | /* CPU masks */ | 29 | /* CPU masks */ |
30 | cpumask_t cpu_online_map = CPU_MASK_NONE; | 30 | cpumask_t cpu_online_map = CPU_MASK_NONE; |
31 | EXPORT_SYMBOL(cpu_online_map); | ||
31 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | 32 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; |
32 | EXPORT_SYMBOL(phys_cpu_present_map); | 33 | EXPORT_SYMBOL(phys_cpu_present_map); |
33 | 34 | ||
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 6c0fb7c4af11..dbebaddcfe39 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -42,6 +42,7 @@ cpumask_t cpu_possible_map; | |||
42 | EXPORT_SYMBOL(cpu_possible_map); | 42 | EXPORT_SYMBOL(cpu_possible_map); |
43 | 43 | ||
44 | cpumask_t cpu_online_map; | 44 | cpumask_t cpu_online_map; |
45 | EXPORT_SYMBOL(cpu_online_map); | ||
45 | static atomic_t cpus_booted = ATOMIC_INIT(0); | 46 | static atomic_t cpus_booted = ATOMIC_INIT(0); |
46 | 47 | ||
47 | /* These are defined by the board-specific code. */ | 48 | /* These are defined by the board-specific code. */ |
diff --git a/kernel/sched.c b/kernel/sched.c index 2bbd948f0169..e4e54e86f4a2 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4384,7 +4384,10 @@ EXPORT_SYMBOL(cpu_present_map); | |||
4384 | 4384 | ||
4385 | #ifndef CONFIG_SMP | 4385 | #ifndef CONFIG_SMP |
4386 | cpumask_t cpu_online_map __read_mostly = CPU_MASK_ALL; | 4386 | cpumask_t cpu_online_map __read_mostly = CPU_MASK_ALL; |
4387 | EXPORT_SYMBOL(cpu_online_map); | ||
4388 | |||
4387 | cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; | 4389 | cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; |
4390 | EXPORT_SYMBOL(cpu_possible_map); | ||
4388 | #endif | 4391 | #endif |
4389 | 4392 | ||
4390 | long sched_getaffinity(pid_t pid, cpumask_t *mask) | 4393 | long sched_getaffinity(pid_t pid, cpumask_t *mask) |