summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-27 16:51:44 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-28 15:53:25 -0700
commit76cc86ee6b3c261b96ea3ee2f4c6dfd127335881 (patch)
tree4994e2e4e7b8482f30a91a206135d6d590184c71 /arch
parentaf8be4e4b316df36a00c1e52a9970c253783b57e (diff)
downloadop-kernel-dev-76cc86ee6b3c261b96ea3ee2f4c6dfd127335881.zip
op-kernel-dev-76cc86ee6b3c261b96ea3ee2f4c6dfd127335881.tar.gz
[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')
-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 a0f000b..ae24919 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)
OpenPOWER on IntegriCloud