]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s/radix: Fix process table entry cache invalidation
authorNicholas Piggin <npiggin@gmail.com>
Tue, 24 Oct 2017 13:06:54 +0000 (23:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Nov 2017 05:48:10 +0000 (16:48 +1100)
commit1ddcdb3da432ebac1d77693e84398b30cad9b1f7
treed54f99c79fb2ec242b8af62b87405fe550db0683
parent2f20b07496a1ccebadcc6302dbdd3bab23801025
powerpc/64s/radix: Fix process table entry cache invalidation

According to the architecture, the process table entry cache must be
flushed with tlbie RIC=2.

Currently the process table entry is set to invalid right before the
PID is returned to the allocator, with no invalidation. This works on
existing implementations that are known to not cache the process table
entry for any except the current PIDR.

It is architecturally correct and cleaner to invalidate with RIC=2
after clearing the process table entry and before the PID is returned
to the allocator. This can be done in arch_exit_mmap that runs before
the final flush, and to ensure the final flush (fullmm) is always a
RIC=2 variant.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/mm/mmu_context_book3s64.c
arch/powerpc/mm/tlb-radix.c