]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/ldt.c
cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / ldt.c
index 21f2bae98c157730eff158c1f921ce3aa23882b3..3fee2aa50f3f63d594304611090338d36f3fcc01 100644 (file)
@@ -62,13 +62,13 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
 
        if (reload) {
 #ifdef CONFIG_SMP
-               cpumask_t mask;
+               cpumask_of_cpu_ptr_declare(mask);
 
                preempt_disable();
                load_LDT(pc);
-               mask = cpumask_of_cpu(smp_processor_id());
-               if (!cpus_equal(current->mm->cpu_vm_mask, mask))
-                       smp_call_function(flush_ldt, current->mm, 1, 1);
+               cpumask_of_cpu_ptr_next(mask, smp_processor_id());
+               if (!cpus_equal(current->mm->cpu_vm_mask, *mask))
+                       smp_call_function(flush_ldt, current->mm, 1);
                preempt_enable();
 #else
                load_LDT(pc);