summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/ldt.c
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-07-15 14:14:32 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-18 22:02:58 +0200
commitc42f4f4c6dab3b2b7768c36173ee7c7ecf79eddb (patch)
tree7da78022bd838f29f0ed39c6aa5b782671fecd7f /arch/x86/kernel/ldt.c
parentcb6d2be60dc3ec9ac788f45d8e24b82a9faacdd9 (diff)
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>
Diffstat (limited to 'arch/x86/kernel/ldt.c')
-rw-r--r--arch/x86/kernel/ldt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
index a8449571858a..3fee2aa50f3f 100644
--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -62,12 +62,12 @@ 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))
+ 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