Skip to content

Commit

Permalink
[SPARC64]: Don't open-code {get,put}_cpu_var() in flush_tlb_pending().
Browse files Browse the repository at this point in the history
Noticed by Andrew Morton.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 28, 2008
1 parent af8be4e commit 76cc86e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/sparc64/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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)
Expand Down

0 comments on commit 76cc86e

Please sign in to comment.