powerpc/mm: Optimize detection of thread local mm's
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 24 Jul 2017 04:28:02 +0000 (14:28 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 23 Aug 2017 12:28:38 +0000 (22:28 +1000)
commita619e59c075c66e530a88e57b45bb0417e2f4fff
tree5f725ed75bdccc3bbd715ae8fb400ae0e55062b2
parentb426e4bd77fa2f03723cc0bada80b00c664f67da
powerpc/mm: Optimize detection of thread local mm's

Instead of comparing the whole CPU mask every time, let's
keep a counter of how many bits are set in the mask. Thus
testing for a local mm only requires testing if that counter
is 1 and the current CPU bit is set in the mask.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/mmu.h
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/include/asm/tlb.h
arch/powerpc/mm/mmu_context_book3s64.c