riscv: alternative only works on !XIP_KERNEL
authorJisheng Zhang <jszhang@kernel.org>
Thu, 10 Feb 2022 16:49:43 +0000 (00:49 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 10 Mar 2022 18:05:19 +0000 (10:05 -0800)
The alternative mechanism needs runtime code patching, it can't work
on XIP_KERNEL. And the errata workarounds are implemented via the
alternative mechanism. So add !XIP_KERNEL dependency for alternative
and erratas.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Fixes: 44c922572952 ("RISC-V: enable XIP")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig.erratas
arch/riscv/Kconfig.socs

index b44d6ecdb46e5c5241ccb70bd293c031f3abb07d..0aacd7052585b5e2820bbcc633a5e8126cbef923 100644 (file)
@@ -2,6 +2,7 @@ menu "CPU errata selection"
 
 config RISCV_ERRATA_ALTERNATIVE
        bool "RISC-V alternative scheme"
+       depends on !XIP_KERNEL
        default y
        help
          This Kconfig allows the kernel to automatically patch the
index 6ec44a22278a419132ece3b12436010a52b7d1b3..c112ab2a90520a0b8e6923f3c32900f0cda40020 100644 (file)
@@ -14,8 +14,8 @@ config SOC_SIFIVE
        select CLK_SIFIVE
        select CLK_SIFIVE_PRCI
        select SIFIVE_PLIC
-       select RISCV_ERRATA_ALTERNATIVE
-       select ERRATA_SIFIVE
+       select RISCV_ERRATA_ALTERNATIVE if !XIP_KERNEL
+       select ERRATA_SIFIVE if !XIP_KERNEL
        help
          This enables support for SiFive SoC platform hardware.