riscv: Apply SiFive CIP-1200 workaround to single-ASID sfence.vma
authorSamuel Holland <samuel.holland@sifive.com>
Wed, 27 Mar 2024 04:49:48 +0000 (21:49 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 29 Apr 2024 17:49:30 +0000 (10:49 -0700)
commit20e03d702e00a3e0269a1d6f9549c2e370492054
tree904848ff0e09b77ca7adb7cba0ab63d3683a79e4
parentc6026d35b6abb5bd954788478bfa800a942e2033
riscv: Apply SiFive CIP-1200 workaround to single-ASID sfence.vma

commit 3f1e782998cd ("riscv: add ASID-based tlbflushing methods") added
calls to the sfence.vma instruction with rs2 != x0. These single-ASID
instruction variants are also affected by SiFive errata CIP-1200.

Until now, the errata workaround was not needed for the single-ASID
sfence.vma variants, because they were only used when the ASID allocator
was enabled, and the affected SiFive platforms do not support multiple
ASIDs. However, we are going to start using those sfence.vma variants
regardless of ASID support, so now we need alternatives covering them.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20240327045035.368512-8-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/errata_list.h
arch/riscv/include/asm/tlbflush.h
arch/riscv/mm/tlbflush.c