powerpc/64s/radix: refactor TLB flush type selection
authorNicholas Piggin <npiggin@gmail.com>
Thu, 17 Dec 2020 13:47:26 +0000 (23:47 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 8 Feb 2021 14:09:44 +0000 (01:09 +1100)
commit26418b36a11f2eaf2556aa8cefe86132907e311f
treee490ad70b3824ee438995a9dff70a786c5b7b168
parenta2496049f1f1006178d0db706a8451dd03bd3ec6
powerpc/64s/radix: refactor TLB flush type selection

The logic to decide what kind of TLB flush is required (local, global,
or IPI) is spread multiple times over the several kinds of TLB flushes.

Move it all into a single function which may issue IPIs if necessary,
and also returns a flush type that is to be used.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201217134731.488135-3-npiggin@gmail.com
arch/powerpc/mm/book3s64/radix_tlb.c