riscv: Improve tlb_flush()
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Mon, 30 Oct 2023 13:30:25 +0000 (14:30 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 6 Nov 2023 15:20:49 +0000 (07:20 -0800)
commitc5e9b2c2ae82231d85d9650854e7b3e97dde33da
treebfb3fa46a8ba4f983d8489127d2613643854fead
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
riscv: Improve tlb_flush()

For now, tlb_flush() simply calls flush_tlb_mm() which results in a
flush of the whole TLB. So let's use mmu_gather fields to provide a more
fine-grained flush of the TLB.

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # On RZ/Five SMARC
Link: https://lore.kernel.org/r/20231030133027.19542-2-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/tlb.h
arch/riscv/include/asm/tlbflush.h
arch/riscv/mm/tlbflush.c