aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tlb_64.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-01-21 03:26:06 -0500
committerTejun Heo <tj@kernel.org>2009-01-21 03:26:06 -0500
commit6dd01bedee6c3191643db303a1dc530bad56ec55 (patch)
tree55d86313c7973e7fe626ceffa7d38925f9997dfb /arch/x86/kernel/tlb_64.c
parentbdbcdd48883940bbd8d17eb01172d58a261a413a (diff)
x86: prepare for tlb merge
Impact: clean up, ipi vector number reordering for x86_32 Make the following changes to prepare for tlb merge. * reorder x86_32 ip vectors * adjust tlb_32.c and tlb_64.c such that their logics coincide exactly - on spurious invalidate ipi, tlb_32 acks the irq - tlb_64 now has proper memory barriers around clearing flush_cpumask (no change in generated code) * unexport flush_tlb_page from tlb_32.c, there's no user * use unsigned int for cpu id * drop unnecessary includes from tlb_64.c 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.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/x86/kernel/tlb_64.c b/arch/x86/kernel/tlb_64.c
index b8bed841ad67..19ac661422f7 100644
--- a/arch/x86/kernel/tlb_64.c
+++ b/arch/x86/kernel/tlb_64.c
@@ -1,20 +1,14 @@
1#include <linux/init.h> 1#include <linux/init.h>
2 2
3#include <linux/mm.h> 3#include <linux/mm.h>
4#include <linux/delay.h>
5#include <linux/spinlock.h> 4#include <linux/spinlock.h>
6#include <linux/smp.h> 5#include <linux/smp.h>
7#include <linux/kernel_stat.h>
8#include <linux/mc146818rtc.h>
9#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include <linux/module.h>
10 8
11#include <asm/mtrr.h>
12#include <asm/pgalloc.h>
13#include <asm/tlbflush.h> 9#include <asm/tlbflush.h>
14#include <asm/mmu_context.h> 10#include <asm/mmu_context.h>
15#include <asm/proto.h> 11#include <asm/apic.h>
16#include <asm/apicdef.h>
17#include <asm/idle.h>
18#include <asm/uv/uv.h> 12#include <asm/uv/uv.h>
19 13
20DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) 14DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate)
@@ -121,8 +115,8 @@ EXPORT_SYMBOL_GPL(leave_mm);
121 115
122asmlinkage void smp_invalidate_interrupt(struct pt_regs *regs) 116asmlinkage void smp_invalidate_interrupt(struct pt_regs *regs)
123{ 117{
124 int cpu; 118 unsigned int cpu;
125 int sender; 119 unsigned int sender;
126 union smp_flush_state *f; 120 union smp_flush_state *f;
127 121
128 cpu = smp_processor_id(); 122 cpu = smp_processor_id();
@@ -155,14 +149,16 @@ asmlinkage void smp_invalidate_interrupt(struct pt_regs *regs)
155 } 149 }
156out: 150out:
157 ack_APIC_irq(); 151 ack_APIC_irq();
152 smp_mb__before_clear_bit();
158 cpumask_clear_cpu(cpu, to_cpumask(f->flush_cpumask)); 153 cpumask_clear_cpu(cpu, to_cpumask(f->flush_cpumask));
154 smp_mb__after_clear_bit();
159 inc_irq_stat(irq_tlb_count); 155 inc_irq_stat(irq_tlb_count);
160} 156}
161 157
162static void flush_tlb_others_ipi(const struct cpumask *cpumask, 158static void flush_tlb_others_ipi(const struct cpumask *cpumask,
163 struct mm_struct *mm, unsigned long va) 159 struct mm_struct *mm, unsigned long va)
164{ 160{
165 int sender; 161 unsigned int sender;
166 union smp_flush_state *f; 162 union smp_flush_state *f;
167 163
168 /* Caller has disabled preemption */ 164 /* Caller has disabled preemption */