aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-27 19:51:44 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-28 18:53:25 -0400
commit76cc86ee6b3c261b96ea3ee2f4c6dfd127335881 (patch)
tree4994e2e4e7b8482f30a91a206135d6d590184c71 /arch/sparc64
parentaf8be4e4b316df36a00c1e52a9970c253783b57e (diff)
[SPARC64]: Don't open-code {get,put}_cpu_var() in flush_tlb_pending().
Noticed by Andrew Morton. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/mm/tlb.c7
1 files changed, 2 insertions, 5 deletions
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, };
23 23
24void flush_tlb_pending(void) 24void flush_tlb_pending(void)
25{ 25{
26 struct mmu_gather *mp; 26 struct mmu_gather *mp = &get_cpu_var(mmu_gathers);
27 27
28 preempt_disable();
29
30 mp = &__get_cpu_var(mmu_gathers);
31 if (mp->tlb_nr) { 28 if (mp->tlb_nr) {
32 flush_tsb_user(mp); 29 flush_tsb_user(mp);
33 30
@@ -43,7 +40,7 @@ void flush_tlb_pending(void)
43 mp->tlb_nr = 0; 40 mp->tlb_nr = 0;
44 } 41 }
45 42
46 preempt_enable(); 43 put_cpu_var(mmu_gathers);
47} 44}
48 45
49void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig) 46void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig)