Unverified Commit 62149f35 authored by Atish Patra's avatar Atish Patra Committed by Palmer Dabbelt
Browse files

RISC-V: Initialize SBI early



Currently, SBI is initialized towards the end of arch setup. This prevents
the set memory operations to be invoked earlier as it requires a full tlb
flush.

Initialize SBI as early as possible.

Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
Tested-by: default avatarGreentime Hu <greentime.hu@sifive.com>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 5cb0080f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -249,6 +249,9 @@ void __init setup_arch(char **cmdline_p)
		pr_err("No DTB found in kernel mappings\n");
#endif

	if (IS_ENABLED(CONFIG_RISCV_SBI))
		sbi_init();

#ifdef CONFIG_SWIOTLB
	swiotlb_init(1);
#endif
@@ -257,10 +260,6 @@ 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