diff --git a/arch/risc-v/src/qemu-rv/qemu_rv_start.c b/arch/risc-v/src/qemu-rv/qemu_rv_start.c index 7a413a186e..5c1d90ab7a 100644 --- a/arch/risc-v/src/qemu-rv/qemu_rv_start.c +++ b/arch/risc-v/src/qemu-rv/qemu_rv_start.c @@ -117,12 +117,13 @@ void qemu_rv_start(int mhartid, const char *dtb) #ifndef CONFIG_BUILD_KERNEL qemu_rv_clear_bss(); -#endif #ifdef CONFIG_RISCV_PERCPU_SCRATCH riscv_percpu_add_hart(mhartid); #endif +#endif + #ifdef CONFIG_DEVICE_TREE fdt_register(dtb); #endif