Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91077
b: refs/heads/master
c: 321a8e9
h: refs/heads/master
i:
  91075: 8c1ff1a
v: v3
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Apr 19, 2008
1 parent a6c3241 commit 281399c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c16ec585c558960a508ccf9a08fcb9ed49b3754
refs/heads/master: 321a8e9dcb714f3c350ba55e41ed447bf3f05fac
6 changes: 6 additions & 0 deletions trunk/include/linux/cpumask.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ int __next_cpu(int n, const cpumask_t *srcp);
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
} }

#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL)

#else

#define CPU_MASK_ALL \
Expand All @@ -251,6 +253,10 @@ int __next_cpu(int n, const cpumask_t *srcp);
[BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
} }

/* cpu_mask_all is in init/main.c */
extern cpumask_t cpu_mask_all;
#define CPU_MASK_ALL_PTR (&cpu_mask_all)

#endif

#define CPU_MASK_NONE \
Expand Down
7 changes: 6 additions & 1 deletion trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,11 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }

#else

#if NR_CPUS > BITS_PER_LONG
cpumask_t cpu_mask_all __read_mostly = CPU_MASK_ALL;
EXPORT_SYMBOL(cpu_mask_all);
#endif

#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;

Expand Down Expand Up @@ -811,7 +816,7 @@ static int __init kernel_init(void * unused)
/*
* init can run on any cpu.
*/
set_cpus_allowed(current, CPU_MASK_ALL);
set_cpus_allowed_ptr(current, CPU_MASK_ALL_PTR);
/*
* Tell the world that we're going to be the grim
* reaper of innocent orphaned children.
Expand Down

0 comments on commit 281399c

Please sign in to comment.