]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: integrate alternatives better into the main architecture
authorHeiko Stuebner <heiko@sntech.de>
Wed, 11 May 2022 19:29:10 +0000 (21:29 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 12 May 2022 04:36:31 +0000 (21:36 -0700)
commit63f52c0ae35e1dfbe25dfcdca2c1aa2784743ff8
treea7b6a69b39c3238d195371cd24dcbee291db1421
parent6d94017b7b59bab528be97be158d0d602982e3a6
riscv: integrate alternatives better into the main architecture

Right now the alternatives need to be explicitly enabled and
erratas are limited to SiFive ones.

We want to use alternatives not only for patching soc erratas,
but in the future also for handling different behaviour depending
on the existence of future extensions.

So move the core alternatives over to the kernel subdirectory
and move the CONFIG_RISCV_ALTERNATIVE to be a hidden symbol
which we expect relevant erratas and extensions to just select
if needed.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Link: https://lore.kernel.org/r/20220511192921.2223629-2-heiko@sntech.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
12 files changed:
arch/riscv/Kconfig
arch/riscv/Kconfig.erratas
arch/riscv/Kconfig.socs
arch/riscv/Makefile
arch/riscv/errata/Makefile
arch/riscv/errata/alternative.c [deleted file]
arch/riscv/include/asm/alternative-macros.h
arch/riscv/include/asm/alternative.h
arch/riscv/kernel/Makefile
arch/riscv/kernel/alternative.c [new file with mode: 0644]
arch/riscv/kernel/smpboot.c
arch/riscv/kernel/traps.c