Commit e16b38f71322efd8a221f64b6ddc0748d21d2e1a

Authored by Greg Banks
Committed by Linus Torvalds
1 parent 0f532f3861

[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>

Showing 4 changed files with 7 additions and 0 deletions Side-by-side Diff

arch/arm/kernel/smp.c
... ... @@ -36,7 +36,9 @@
36 36 * The online bitmask indicates that the CPU is up and running.
37 37 */
38 38 cpumask_t cpu_possible_map;
  39 +EXPORT_SYMBOL(cpu_possible_map);
39 40 cpumask_t cpu_online_map;
  41 +EXPORT_SYMBOL(cpu_online_map);
40 42  
41 43 /*
42 44 * as from 2.5, kernels no longer have an init_tasks structure
arch/cris/arch-v32/kernel/smp.c
... ... @@ -28,6 +28,7 @@
28 28  
29 29 /* CPU masks */
30 30 cpumask_t cpu_online_map = CPU_MASK_NONE;
  31 +EXPORT_SYMBOL(cpu_online_map);
31 32 cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
32 33 EXPORT_SYMBOL(phys_cpu_present_map);
33 34  
arch/sh/kernel/smp.c
... ... @@ -42,6 +42,7 @@
42 42 EXPORT_SYMBOL(cpu_possible_map);
43 43  
44 44 cpumask_t cpu_online_map;
  45 +EXPORT_SYMBOL(cpu_online_map);
45 46 static atomic_t cpus_booted = ATOMIC_INIT(0);
46 47  
47 48 /* These are defined by the board-specific code. */
... ... @@ -4384,7 +4384,10 @@
4384 4384  
4385 4385 #ifndef CONFIG_SMP
4386 4386 cpumask_t cpu_online_map __read_mostly = CPU_MASK_ALL;
  4387 +EXPORT_SYMBOL(cpu_online_map);
  4388 +
4387 4389 cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL;
  4390 +EXPORT_SYMBOL(cpu_possible_map);
4388 4391 #endif
4389 4392  
4390 4393 long sched_getaffinity(pid_t pid, cpumask_t *mask)