Commit 3b03ac6b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Paul Walmsley

riscv: poison SBI calls for M-mode

There is no SBI when we run in M-mode, so fail the compile for any code
trying to use SBI calls.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
parent eded8bc6
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/types.h> #include <linux/types.h>
#ifdef CONFIG_RISCV_SBI
#define SBI_SET_TIMER 0 #define SBI_SET_TIMER 0
#define SBI_CONSOLE_PUTCHAR 1 #define SBI_CONSOLE_PUTCHAR 1
#define SBI_CONSOLE_GETCHAR 2 #define SBI_CONSOLE_GETCHAR 2
...@@ -93,5 +94,5 @@ static inline void sbi_remote_sfence_vma_asid(const unsigned long *hart_mask, ...@@ -93,5 +94,5 @@ static inline void sbi_remote_sfence_vma_asid(const unsigned long *hart_mask,
{ {
SBI_CALL_4(SBI_REMOTE_SFENCE_VMA_ASID, hart_mask, start, size, asid); SBI_CALL_4(SBI_REMOTE_SFENCE_VMA_ASID, hart_mask, start, size, asid);
} }
#endif /* CONFIG_RISCV_SBI */
#endif #endif /* _ASM_RISCV_SBI_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment