Kaynağa Gözat

cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c

  * Optimize various places where a pointer to the cpumask_of_cpu value
    will result in reducing stack pressure.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Mike Travis 17 yıl önce
ebeveyn
işleme
c42f4f4c6d
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      arch/x86/kernel/ldt.c

+ 3 - 3
arch/x86/kernel/ldt.c

@@ -62,12 +62,12 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
 
 
 	if (reload) {
 	if (reload) {
 #ifdef CONFIG_SMP
 #ifdef CONFIG_SMP
-		cpumask_t mask;
+		cpumask_of_cpu_ptr_declare(mask);
 
 
 		preempt_disable();
 		preempt_disable();
 		load_LDT(pc);
 		load_LDT(pc);
-		mask = cpumask_of_cpu(smp_processor_id());
-		if (!cpus_equal(current->mm->cpu_vm_mask, mask))
+		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);
 			smp_call_function(flush_ldt, current->mm, 1);
 		preempt_enable();
 		preempt_enable();
 #else
 #else