From: David S. Miller Date: Thu, 27 Mar 2008 23:51:44 +0000 (-0700) Subject: [SPARC64]: Don't open-code {get,put}_cpu_var() in flush_tlb_pending(). X-Git-Tag: MMI-PSA29.97-13-9~35672^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76cc86ee6b3c261b96ea3ee2f4c6dfd127335881;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [SPARC64]: Don't open-code {get,put}_cpu_var() in flush_tlb_pending(). Noticed by Andrew Morton. Signed-off-by: David S. Miller --- diff --git a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c index a0f000b293de..ae24919cba7c 100644 --- a/arch/sparc64/mm/tlb.c +++ b/arch/sparc64/mm/tlb.c @@ -23,11 +23,8 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers) = { 0, }; void flush_tlb_pending(void) { - struct mmu_gather *mp; + struct mmu_gather *mp = &get_cpu_var(mmu_gathers); - preempt_disable(); - - mp = &__get_cpu_var(mmu_gathers); if (mp->tlb_nr) { flush_tsb_user(mp); @@ -43,7 +40,7 @@ void flush_tlb_pending(void) mp->tlb_nr = 0; } - preempt_enable(); + put_cpu_var(mmu_gathers); } void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig)