diff options
author | Tejun Heo <tj@kernel.org> | 2009-01-21 03:26:06 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-21 03:26:06 -0500 |
commit | bdbcdd48883940bbd8d17eb01172d58a261a413a (patch) | |
tree | 59ae56454b3ccd8fbc14c57af97ed4bbade58e51 /arch/x86/kernel/tlb_64.c | |
parent | d650a5148593b65a3c3f9a344f46b91b7dfe7713 (diff) |
x86: uv cleanup
Impact: cleanup
Make the following uv related cleanups.
* collect visible uv related definitions and interfaces into uv/uv.h
and use it. this cleans up the messy situation where on 64bit, uv
is defined properly, on 32bit generic it's dummy and on the rest
undefined. after this clean up, uv is defined on 64 and dummy on
32.
* update uv_flush_tlb_others() such that it takes cpumask of
to-be-flushed cpus as argument, instead of that minus self, and
returns yet-to-be-flushed cpumask, instead of modifying the passed
in parameter. this interface change will ease dummy implementation
of uv_flush_tlb_others() and makes uv tlb flush related stuff
defined in tlb_uv proper.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/tlb_64.c')
-rw-r--r-- | arch/x86/kernel/tlb_64.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/x86/kernel/tlb_64.c b/arch/x86/kernel/tlb_64.c index e64a32c48825..b8bed841ad67 100644 --- a/arch/x86/kernel/tlb_64.c +++ b/arch/x86/kernel/tlb_64.c | |||
@@ -15,8 +15,7 @@ | |||
15 | #include <asm/proto.h> | 15 | #include <asm/proto.h> |
16 | #include <asm/apicdef.h> | 16 | #include <asm/apicdef.h> |
17 | #include <asm/idle.h> | 17 | #include <asm/idle.h> |
18 | #include <asm/uv/uv_hub.h> | 18 | #include <asm/uv/uv.h> |
19 | #include <asm/uv/uv_bau.h> | ||
20 | 19 | ||
21 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) | 20 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) |
22 | = { &init_mm, 0, }; | 21 | = { &init_mm, 0, }; |
@@ -206,16 +205,13 @@ void native_flush_tlb_others(const struct cpumask *cpumask, | |||
206 | struct mm_struct *mm, unsigned long va) | 205 | struct mm_struct *mm, unsigned long va) |
207 | { | 206 | { |
208 | if (is_uv_system()) { | 207 | if (is_uv_system()) { |
209 | /* FIXME: could be an percpu_alloc'd thing */ | 208 | unsigned int cpu; |
210 | static DEFINE_PER_CPU(cpumask_t, flush_tlb_mask); | ||
211 | struct cpumask *after_uv_flush = &get_cpu_var(flush_tlb_mask); | ||
212 | 209 | ||
213 | cpumask_andnot(after_uv_flush, cpumask, | 210 | cpu = get_cpu(); |
214 | cpumask_of(smp_processor_id())); | 211 | cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu); |
215 | if (!uv_flush_tlb_others(after_uv_flush, mm, va)) | 212 | if (cpumask) |
216 | flush_tlb_others_ipi(after_uv_flush, mm, va); | 213 | flush_tlb_others_ipi(cpumask, mm, va); |
217 | 214 | put_cpu(); | |
218 | put_cpu_var(flush_tlb_uv_cpumask); | ||
219 | return; | 215 | return; |
220 | } | 216 | } |
221 | flush_tlb_others_ipi(cpumask, mm, va); | 217 | flush_tlb_others_ipi(cpumask, mm, va); |