diff options
author | Andrew Morton <akpm@osdl.org> | 2004-06-23 18:51:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-23 18:51:00 -0700 |
commit | f3344dc35c26c28647ae4a6b9cdd9df3fa65777e (patch) | |
tree | 2c05fa2a567b8326a391e89d01fde60794e5c9c5 /kernel | |
parent | d6cf71d3086ea9be652ac95616cd111157fdd4c5 (diff) | |
download | history-f3344dc35c26c28647ae4a6b9cdd9df3fa65777e.tar.gz |
[PATCH] cpumask: rewrite cpumask.h - single bitmap based implementation
From: Paul Jackson <pj@sgi.com>
Major rewrite of cpumask to use a single implementation, as a struct-wrapped
bitmap.
This patch leaves some 26 include/asm-*/cpumask*.h header files orphaned - to
be removed next patch.
Some nine cpumask macros for const variants and to coerce and promote between
an unsigned long and a cpumask are obsolete. Simple emulation wrappers are
provided in this patch for these obsolete macros, which can be removed once
each of the 3 archs (i386, ppc64, x86_64) using them are recoded in follow-on
patches to not need them.
The CPU_MASK_ALL macro now avoids leaving possible garbage one bits in any
unused portion of the high word.
An inproved comment lists all available operators, for convenient browsing.
From: Mikael Pettersson <mikpe@csd.uu.se>
2.6.7-rc3-mm1 changed CPU_MASK_NONE into something that isn't a valid
rvalue (it only works inside struct initializers). This caused compile-time
errors in perfctr in UP x86 builds.
From: Arnd Bergmann <arnd@arndb.de>
cpumask-5-10-rewrite-cpumaskh-single-bitmap-based from 2.6.7-rc3-mm1
causes include2/asm/smp.h:54:1: warning: "cpu_online" redefined
Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcupdate.c | 7 | ||||
-rw-r--r-- | kernel/sched.c | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 7282889a5fd907..f35f944abe3d3a 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@ -129,17 +129,14 @@ static void rcu_do_batch(struct rcu_head *list) */ static void rcu_start_batch(int next_pending) { - cpumask_t active; - if (next_pending) rcu_ctrlblk.next_pending = 1; if (rcu_ctrlblk.next_pending && rcu_ctrlblk.completed == rcu_ctrlblk.cur) { /* Can't change, since spin lock held. */ - active = nohz_cpu_mask; - cpus_complement(active); - cpus_and(rcu_state.rcu_cpu_mask, cpu_online_map, active); + cpus_andnot(rcu_state.rcu_cpu_mask, cpu_online_map, + nohz_cpu_mask); write_seqcount_begin(&rcu_ctrlblk.lock); rcu_ctrlblk.next_pending = 0; rcu_ctrlblk.cur++; diff --git a/kernel/sched.c b/kernel/sched.c index a614d7ebf7c3af..f0103ee1d66af3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2951,6 +2951,11 @@ out_unlock: cpumask_t cpu_present_map; EXPORT_SYMBOL(cpu_present_map); +#ifndef CONFIG_SMP +cpumask_t cpu_online_map = CPU_MASK_ALL; +cpumask_t cpu_possible_map = CPU_MASK_ALL; +#endif + /** * sys_sched_getaffinity - get the cpu affinity of a process * @pid: pid of the process |