diff options
Diffstat (limited to 'arch/x86/mm/tlb.c')
-rw-r--r-- | arch/x86/mm/tlb.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 36fe08eeb5c3..426f3a1a64d3 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <asm/tlbflush.h> | 9 | #include <asm/tlbflush.h> |
10 | #include <asm/mmu_context.h> | 10 | #include <asm/mmu_context.h> |
11 | #include <asm/cache.h> | ||
11 | #include <asm/apic.h> | 12 | #include <asm/apic.h> |
12 | #include <asm/uv/uv.h> | 13 | #include <asm/uv/uv.h> |
13 | 14 | ||
@@ -40,10 +41,10 @@ union smp_flush_state { | |||
40 | struct { | 41 | struct { |
41 | struct mm_struct *flush_mm; | 42 | struct mm_struct *flush_mm; |
42 | unsigned long flush_va; | 43 | unsigned long flush_va; |
43 | spinlock_t tlbstate_lock; | 44 | raw_spinlock_t tlbstate_lock; |
44 | DECLARE_BITMAP(flush_cpumask, NR_CPUS); | 45 | DECLARE_BITMAP(flush_cpumask, NR_CPUS); |
45 | }; | 46 | }; |
46 | char pad[CONFIG_X86_INTERNODE_CACHE_BYTES]; | 47 | char pad[INTERNODE_CACHE_BYTES]; |
47 | } ____cacheline_internodealigned_in_smp; | 48 | } ____cacheline_internodealigned_in_smp; |
48 | 49 | ||
49 | /* State is put into the per CPU data section, but padded | 50 | /* State is put into the per CPU data section, but padded |
@@ -180,7 +181,7 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask, | |||
180 | * num_online_cpus() <= NUM_INVALIDATE_TLB_VECTORS, but it is | 181 | * num_online_cpus() <= NUM_INVALIDATE_TLB_VECTORS, but it is |
181 | * probably not worth checking this for a cache-hot lock. | 182 | * probably not worth checking this for a cache-hot lock. |
182 | */ | 183 | */ |
183 | spin_lock(&f->tlbstate_lock); | 184 | raw_spin_lock(&f->tlbstate_lock); |
184 | 185 | ||
185 | f->flush_mm = mm; | 186 | f->flush_mm = mm; |
186 | f->flush_va = va; | 187 | f->flush_va = va; |
@@ -198,7 +199,7 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask, | |||
198 | 199 | ||
199 | f->flush_mm = NULL; | 200 | f->flush_mm = NULL; |
200 | f->flush_va = 0; | 201 | f->flush_va = 0; |
201 | spin_unlock(&f->tlbstate_lock); | 202 | raw_spin_unlock(&f->tlbstate_lock); |
202 | } | 203 | } |
203 | 204 | ||
204 | void native_flush_tlb_others(const struct cpumask *cpumask, | 205 | void native_flush_tlb_others(const struct cpumask *cpumask, |
@@ -222,7 +223,7 @@ static int __cpuinit init_smp_flush(void) | |||
222 | int i; | 223 | int i; |
223 | 224 | ||
224 | for (i = 0; i < ARRAY_SIZE(flush_state); i++) | 225 | for (i = 0; i < ARRAY_SIZE(flush_state); i++) |
225 | spin_lock_init(&flush_state[i].tlbstate_lock); | 226 | raw_spin_lock_init(&flush_state[i].tlbstate_lock); |
226 | 227 | ||
227 | return 0; | 228 | return 0; |
228 | } | 229 | } |