aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorDamien Le Moal2019-10-28 13:10:33 +0100
committerPaul Walmsley2019-11-13 13:20:02 -0800
commiteded8bc66a0c2c43a1789ac6c973e2c5d47eac12 (patch)
tree69141b205a7739d3b268a3e2fa30922ea7e428e3 /arch/riscv
parenta4c3733d32a72f11dee86d0731d7565aa6ebe22d (diff)
riscv: don't allow selecting SBI based drivers for M-mode
When running in M-mode we can't use SBI based drivers. Add a new CONFIG_RISCV_SBI that drivers that do SBI calls can depend on instead. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/Kconfig6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 86b7e8b0471c..b85492c42ccb 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -76,6 +76,12 @@ config ARCH_MMAP_RND_BITS_MAX
config RISCV_M_MODE
bool
+# set if we are running in S-mode and can use SBI calls
+config RISCV_SBI
+ bool
+ depends on !RISCV_M_MODE
+ default y
+
config MMU
def_bool y