aboutsummaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/setup.c
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2020-03-17 18:11:35 -0700
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-03-31 11:25:29 -0700
commitb9dcd9e415872ae29f87667d23c8a8b946d24611 (patch)
treea3d47ede25deecc7f672979fd539a7e0789c48f2 /arch/riscv/kernel/setup.c
parentRISC-V: Mark existing SBI as 0.1 SBI. (diff)
downloadlinux-dev-b9dcd9e415872ae29f87667d23c8a8b946d24611.tar.xz
linux-dev-b9dcd9e415872ae29f87667d23c8a8b946d24611.zip
RISC-V: Add basic support for SBI v0.2
The SBI v0.2 introduces a base extension which is backward compatible with v0.1. Implement all helper functions and minimum required SBI calls from v0.2 for now. All other base extension function will be added later as per need. As v0.2 calling convention is backward compatible with v0.1, remove the v0.1 helper functions and just use v0.2 calling convention. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/kernel/setup.c')
-rw-r--r--arch/riscv/kernel/setup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index cb836fcc6118..07f4e7503223 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -22,6 +22,7 @@
#include <asm/sections.h>
#include <asm/pgtable.h>
#include <asm/smp.h>
+#include <asm/sbi.h>
#include <asm/tlbflush.h>
#include <asm/thread_info.h>
#include <asm/kasan.h>
@@ -83,6 +84,10 @@ void __init setup_arch(char **cmdline_p)
kasan_init();
#endif
+#if IS_ENABLED(CONFIG_RISCV_SBI)
+ sbi_init();
+#endif
+
#ifdef CONFIG_SMP
setup_smp();
#endif