riscv: add memory-type errata for T-Head
authorHeiko Stuebner <heiko@sntech.de>
Wed, 11 May 2022 19:29:21 +0000 (21:29 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 12 May 2022 04:36:33 +0000 (21:36 -0700)
commita35707c3d850dda0ceefb75b1b3bd191921d5765
tree00188dae0c8c04eabd08b304924d1d84c92acbd1
parent1745cfafebdfb017f6871c80f9894910a76373a4
riscv: add memory-type errata for T-Head

Some current cpus based on T-Head cores implement memory-types
way different than described in the svpbmt spec even going
so far as using PTE bits marked as reserved.

Add the T-Head vendor-id and necessary errata code to
replace the affected instructions.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220511192921.2223629-13-heiko@sntech.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
15 files changed:
arch/riscv/Kconfig
arch/riscv/Kconfig.erratas
arch/riscv/errata/Makefile
arch/riscv/errata/sifive/errata.c
arch/riscv/errata/thead/Makefile [new file with mode: 0644]
arch/riscv/errata/thead/errata.c [new file with mode: 0644]
arch/riscv/include/asm/alternative.h
arch/riscv/include/asm/errata_list.h
arch/riscv/include/asm/pgtable-64.h
arch/riscv/include/asm/pgtable.h
arch/riscv/include/asm/vendorid_list.h
arch/riscv/kernel/Makefile
arch/riscv/kernel/alternative.c
arch/riscv/kernel/cpufeature.c
arch/riscv/mm/init.c