diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-07-24 06:28:01 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-08-23 14:27:45 +0200 |
commit | b426e4bd77fa2f03723cc0bada80b00c664f67da (patch) | |
tree | 23f91e12eb43460dfc9aa0f6d912c88b374d6f7d /arch/powerpc/mm/tlb_hash64.c | |
parent | powerpc/mm: Avoid double irq save/restore in activate_mm (diff) | |
download | linux-b426e4bd77fa2f03723cc0bada80b00c664f67da.tar.xz linux-b426e4bd77fa2f03723cc0bada80b00c664f67da.zip |
powerpc/mm: Use mm_is_thread_local() instread of open-coding
We open-code testing for the mm being local to the current CPU
in a few places. Use our existing helper instead.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/tlb_hash64.c')
-rw-r--r-- | arch/powerpc/mm/tlb_hash64.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c index 71cb2742bd16..881ebd53ffc2 100644 --- a/arch/powerpc/mm/tlb_hash64.c +++ b/arch/powerpc/mm/tlb_hash64.c @@ -140,13 +140,10 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr, */ void __flush_tlb_pending(struct ppc64_tlb_batch *batch) { - const struct cpumask *tmp; - int i, local = 0; + int i, local; i = batch->index; - tmp = cpumask_of(smp_processor_id()); - if (cpumask_equal(mm_cpumask(batch->mm), tmp)) - local = 1; + local = mm_is_thread_local(batch->mm); if (i == 1) flush_hash_page(batch->vpn[0], batch->pte[0], batch->psize, batch->ssize, local); |