Skip to content

Commit c80ee64

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: alternative only works on !XIP_KERNEL
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 <[email protected]> Fixes: 44c9225 ("RISC-V: enable XIP") Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 74583f1 commit c80ee64

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

arch/riscv/Kconfig.erratas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ menu "CPU errata selection"
22

33
config RISCV_ERRATA_ALTERNATIVE
44
bool "RISC-V alternative scheme"
5+
depends on !XIP_KERNEL
56
default y
67
help
78
This Kconfig allows the kernel to automatically patch the

arch/riscv/Kconfig.socs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ config SOC_SIFIVE
1414
select CLK_SIFIVE
1515
select CLK_SIFIVE_PRCI
1616
select SIFIVE_PLIC
17-
select RISCV_ERRATA_ALTERNATIVE
18-
select ERRATA_SIFIVE
17+
select RISCV_ERRATA_ALTERNATIVE if !XIP_KERNEL
18+
select ERRATA_SIFIVE if !XIP_KERNEL
1919
help
2020
This enables support for SiFive SoC platform hardware.
2121

0 commit comments

Comments
 (0)