riscv: allow different stages with alternatives
authorHeiko Stuebner <heiko@sntech.de>
Wed, 11 May 2022 19:29:11 +0000 (21:29 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 12 May 2022 04:36:31 +0000 (21:36 -0700)
commitd14ca1f8d3039970e812fec1f01e7b46b62cc5fc
treed71e6034b692fd44af4188941af5174d54871705
parente64f737ad70fee4a3c57d147fc511e5d5014b5dd
riscv: allow different stages with alternatives

Future features may need to be applied at a different
time during boot, so allow defining stages for alternatives
and handling them differently depending on the stage.

Also make the alternatives-location more flexible so that
future stages may provide their own location.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Link: https://lore.kernel.org/r/20220511192921.2223629-3-heiko@sntech.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/errata/sifive/errata.c
arch/riscv/include/asm/alternative.h
arch/riscv/kernel/alternative.c