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/hugetlbpage.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/hugetlbpage.c')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 2d4a331e498e..1571a498a33f 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -275,8 +275,7 @@ static void hugepd_free(struct mmu_gather *tlb, void *hugepte) batchp = &get_cpu_var(hugepd_freelist_cur); if (atomic_read(&tlb->mm->mm_users) < 2 || - cpumask_equal(mm_cpumask(tlb->mm), - cpumask_of(smp_processor_id()))) { + mm_is_thread_local(tlb->mm)) { kmem_cache_free(hugepte_cache, hugepte); put_cpu_var(hugepd_freelist_cur); return; |