]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm/radix: Optimise tlbiel flush all case
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 26 Apr 2017 11:38:17 +0000 (21:38 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 27 Apr 2017 12:20:21 +0000 (22:20 +1000)
commit0ed6cda831a60511cbbe0cf14096c5cc0b5c2aea
tree4add33a8c9af7f32c221839e70e24ca204e99ee8
parent57c722e30222a9c28e17753108aa348f4c0a5163
powerpc/mm/radix: Optimise tlbiel flush all case

_tlbiel_pid() is called with a ric (Radix Invalidation Control) argument of
either RIC_FLUSH_TLB or RIC_FLUSH_ALL.

RIC_FLUSH_ALL says to invalidate the entire TLB and the Page Walk Cache (PWC).

To flush the whole TLB, we have to iterate over each set (congruence class) of
the TLB. Currently we do that and pass RIC_FLUSH_ALL each time. That is not
incorrect but it means we flush the PWC 128 times, when once would suffice.

Fix it by doing the first flush with the ric value we're passed, and then if it
was RIC_FLUSH_ALL, we downgrade it to RIC_FLUSH_TLB, because we know we have
just flushed the PWC and don't need to do it again.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
[mpe: Split out of combined patch, tweak logic, rewrite change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/tlb-radix.c