diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-01-11 00:58:09 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-30 09:47:34 -0500 |
commit | 4ab0a9409af5fad74ad1fc9e46d5a8b460f353e9 (patch) | |
tree | d6c5bba1ffb35c5655a736d6d736d086ed3316eb | |
parent | 3a9f84d354ce1e19956083c8e691727dea33bd5a (diff) |
cpumask: convert lib/smp_processor_id to new cpumask ops
Impact: fix debug_smp_processor_id() for CONFIG_CPUMASK_OFFSTACK=y
The scheduler now uses the new cpumask API, which deals up to
nr_cpumask_bits, whereas the API used NR_CPUS bits.
If CONFIG_CPUMASK_OFFSTACK=y these two are not equal, so the top bits
are undefined. Leading to bug 12518 "BUG: using smp_processor_id() in
preemptible [00000000] code: dellWirelessCtl/..."
The fix is simple: use the modern API in the check.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | lib/smp_processor_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index 0f8fc22ed103..4689cb073da4 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c | |||
@@ -22,7 +22,7 @@ notrace unsigned int debug_smp_processor_id(void) | |||
22 | * Kernel threads bound to a single CPU can safely use | 22 | * Kernel threads bound to a single CPU can safely use |
23 | * smp_processor_id(): | 23 | * smp_processor_id(): |
24 | */ | 24 | */ |
25 | if (cpus_equal(current->cpus_allowed, cpumask_of_cpu(this_cpu))) | 25 | if (cpumask_equal(¤t->cpus_allowed, cpumask_of(this_cpu))) |
26 | goto out; | 26 | goto out; |
27 | 27 | ||
28 | /* | 28 | /* |