aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/cpumask.h6
-rw-r--r--init/main.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 67e0e38d32b1..629102feaa66 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -243,6 +243,8 @@ int __next_cpu(int n, const cpumask_t *srcp);
243 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 243 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
244} } 244} }
245 245
246#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL)
247
246#else 248#else
247 249
248#define CPU_MASK_ALL \ 250#define CPU_MASK_ALL \
@@ -251,6 +253,10 @@ int __next_cpu(int n, const cpumask_t *srcp);
251 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 253 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
252} } 254} }
253 255
256/* cpu_mask_all is in init/main.c */
257extern cpumask_t cpu_mask_all;
258#define CPU_MASK_ALL_PTR (&cpu_mask_all)
259
254#endif 260#endif
255 261
256#define CPU_MASK_NONE \ 262#define CPU_MASK_NONE \
diff --git a/init/main.c b/init/main.c
index 99ce94930b09..2df3f0617fdc 100644
--- a/init/main.c
+++ b/init/main.c
@@ -363,6 +363,11 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }
363 363
364#else 364#else
365 365
366#if NR_CPUS > BITS_PER_LONG
367cpumask_t cpu_mask_all __read_mostly = CPU_MASK_ALL;
368EXPORT_SYMBOL(cpu_mask_all);
369#endif
370
366#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA 371#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
367unsigned long __per_cpu_offset[NR_CPUS] __read_mostly; 372unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
368 373
@@ -811,7 +816,7 @@ static int __init kernel_init(void * unused)
811 /* 816 /*
812 * init can run on any cpu. 817 * init can run on any cpu.
813 */ 818 */
814 set_cpus_allowed(current, CPU_MASK_ALL); 819 set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR);
815 /* 820 /*
816 * Tell the world that we're going to be the grim 821 * Tell the world that we're going to be the grim
817 * reaper of innocent orphaned children. 822 * reaper of innocent orphaned children.