diff options
author | Mike Travis <travis@sgi.com> | 2008-07-15 17:14:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 16:02:58 -0400 |
commit | c42f4f4c6dab3b2b7768c36173ee7c7ecf79eddb (patch) | |
tree | 7da78022bd838f29f0ed39c6aa5b782671fecd7f /arch | |
parent | cb6d2be60dc3ec9ac788f45d8e24b82a9faacdd9 (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')
-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) | |||
62 | 62 | ||
63 | if (reload) { | 63 | if (reload) { |
64 | #ifdef CONFIG_SMP | 64 | #ifdef CONFIG_SMP |
65 | cpumask_t mask; | 65 | cpumask_of_cpu_ptr_declare(mask); |
66 | 66 | ||
67 | preempt_disable(); | 67 | preempt_disable(); |
68 | load_LDT(pc); | 68 | load_LDT(pc); |
69 | mask = cpumask_of_cpu(smp_processor_id()); | 69 | cpumask_of_cpu_ptr_next(mask, smp_processor_id()); |
70 | if (!cpus_equal(current->mm->cpu_vm_mask, mask)) | 70 | if (!cpus_equal(current->mm->cpu_vm_mask, *mask)) |
71 | smp_call_function(flush_ldt, current->mm, 1); | 71 | smp_call_function(flush_ldt, current->mm, 1); |
72 | preempt_enable(); | 72 | preempt_enable(); |
73 | #else | 73 | #else |