riscv: mm: Always use an ASID to flush mm contexts
authorSamuel Holland <samuel.holland@sifive.com>
Wed, 27 Mar 2024 04:49:54 +0000 (21:49 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 29 Apr 2024 17:49:36 +0000 (10:49 -0700)
commitdaef19263fc102551d734f39d9ad417098ffb360
tree176ad901b7512769856c468ef91620275a91c81f
parent8fc21cc672e8ea7954fdc6b59d9ce350730e9c92
riscv: mm: Always use an ASID to flush mm contexts

Even if multiple ASIDs are not supported, using the single-ASID variant
of the sfence.vma instruction preserves TLB entries for global (kernel)
pages. So it is always more efficient to use the single-ASID code path.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-14-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/tlbflush.c