aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@intel.com>2012-05-11 03:35:27 -0400
committerTejun Heo <tj@kernel.org>2012-05-14 17:15:31 -0400
commitc6ae41e7d469f00d9c92a2b2887c7235d121c009 (patch)
treeb16d65641c1e99a622ab460aee9f5b13e1948a25 /arch/x86/mm
parent19e8d69c543f8f62050099892b138e981db952cc (diff)
x86: replace percpu_xxx funcs with this_cpu_xxx
Since percpu_xxx() serial functions are duplicated with this_cpu_xxx(). Removing percpu_xxx() definition and replacing them by this_cpu_xxx() in code. There is no function change in this patch, just preparation for later percpu_xxx serial function removing. On x86 machine the this_cpu_xxx() serial functions are same as __this_cpu_xxx() without no unnecessary premmpt enable/disable. Thanks for Stephen Rothwell, he found and fixed a i386 build error in the patch. Also thanks for Andrew Morton, he kept updating the patchset in Linus' tree. Signed-off-by: Alex Shi <alex.shi@intel.com> Acked-by: Christoph Lameter <cl@gentwo.org> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/tlb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index d6c0418c3e47..3804471db104 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -61,10 +61,10 @@ static DEFINE_PER_CPU_READ_MOSTLY(int, tlb_vector_offset);
61 */ 61 */
62void leave_mm(int cpu) 62void leave_mm(int cpu)
63{ 63{
64 if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK) 64 if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
65 BUG(); 65 BUG();
66 cpumask_clear_cpu(cpu, 66 cpumask_clear_cpu(cpu,
67 mm_cpumask(percpu_read(cpu_tlbstate.active_mm))); 67 mm_cpumask(this_cpu_read(cpu_tlbstate.active_mm)));
68 load_cr3(swapper_pg_dir); 68 load_cr3(swapper_pg_dir);
69} 69}
70EXPORT_SYMBOL_GPL(leave_mm); 70EXPORT_SYMBOL_GPL(leave_mm);
@@ -152,8 +152,8 @@ void smp_invalidate_interrupt(struct pt_regs *regs)
152 * BUG(); 152 * BUG();
153 */ 153 */
154 154
155 if (f->flush_mm == percpu_read(cpu_tlbstate.active_mm)) { 155 if (f->flush_mm == this_cpu_read(cpu_tlbstate.active_mm)) {
156 if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK) { 156 if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK) {
157 if (f->flush_va == TLB_FLUSH_ALL) 157 if (f->flush_va == TLB_FLUSH_ALL)
158 local_flush_tlb(); 158 local_flush_tlb();
159 else 159 else
@@ -322,7 +322,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
322static void do_flush_tlb_all(void *info) 322static void do_flush_tlb_all(void *info)
323{ 323{
324 __flush_tlb_all(); 324 __flush_tlb_all();
325 if (percpu_read(cpu_tlbstate.state) == TLBSTATE_LAZY) 325 if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_LAZY)
326 leave_mm(smp_processor_id()); 326 leave_mm(smp_processor_id());
327} 327}
328 328