diff options
author | Mike Travis <travis@sgi.com> | 2008-07-15 23:14:32 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 22:02:58 +0200 |
commit | c42f4f4c6dab3b2b7768c36173ee7c7ecf79eddb (patch) | |
tree | 7da78022bd838f29f0ed39c6aa5b782671fecd7f /arch/x86/kernel/ldt.c | |
parent | cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c (diff) | |
download | linux-c42f4f4c6dab3b2b7768c36173ee7c7ecf79eddb.tar.xz linux-c42f4f4c6dab3b2b7768c36173ee7c7ecf79eddb.zip |
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.c | 6 |
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 |