]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jul 2024 10:49:06 +0000 (12:49 +0200)
commit864a02425045a6cf0d0700902d3192bfdfbff3fc
treeee1c384bb315eb2d1a592b9d76828a1a1acf4ae8
parentaf19067bd58f0f6f90eb6c604babffb55c2d6a00
riscv: Apply SiFive CIP-1200 workaround to single-ASID sfence.vma

[ Upstream commit 20e03d702e00a3e0269a1d6f9549c2e370492054 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/include/asm/errata_list.h
arch/riscv/include/asm/tlbflush.h
arch/riscv/mm/tlbflush.c