]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
cpumask: convert lib/smp_processor_id to new cpumask ops
authorRusty Russell <rusty@rustcorp.com.au>
Sun, 11 Jan 2009 05:58:09 +0000 (21:58 -0800)
committerIngo Molnar <mingo@elte.hu>
Fri, 30 Jan 2009 14:47:34 +0000 (15:47 +0100)
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>
lib/smp_processor_id.c

index 0f8fc22ed1030a200f1fd3c203ca6789c5646ac8..4689cb073da4ef00000fecd739583bf19f23f6f1 100644 (file)
@@ -22,7 +22,7 @@ notrace unsigned int debug_smp_processor_id(void)
         * Kernel threads bound to a single CPU can safely use
         * smp_processor_id():
         */
-       if (cpus_equal(current->cpus_allowed, cpumask_of_cpu(this_cpu)))
+       if (cpumask_equal(&current->cpus_allowed, cpumask_of(this_cpu)))
                goto out;
 
        /*