riscv: sifive: Apply errata "cip-1200" patch
authorVincent Chen <vincent.chen@sifive.com>
Mon, 22 Mar 2021 14:26:06 +0000 (22:26 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 26 Apr 2021 15:24:58 +0000 (08:24 -0700)
commitbff3ff525460b492dca1d1665e821d2b5816ebdb
tree2539544e7184b7974f96c38fced50a3516f92aa5
parent800149a77c2cb8746a94457939b1ba1e37d2c14e
riscv: sifive: Apply errata "cip-1200" patch

For certain SiFive CPUs, "sfence.vma addr" cannot exactly flush addr
from TLB in the particular cases. The details could be found here:
https://sifive.cdn.prismic.io/sifive/167a1a56-03f4-4615-a79e-b2a86153148f_FU740_errata_20210205.pdf
In order to ensure the functionality, this patch uses the Alternative
scheme to replace all "sfence.vma addr" with "sfence.vma" at runtime.

Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig.erratas
arch/riscv/errata/sifive/errata.c
arch/riscv/include/asm/errata_list.h
arch/riscv/include/asm/tlbflush.h