diff --git a/arch/risc-v/src/qemu-rv/qemu_rv_head.S b/arch/risc-v/src/qemu-rv/qemu_rv_head.S index 979fe435368..6c6531a0ca2 100644 --- a/arch/risc-v/src/qemu-rv/qemu_rv_head.S +++ b/arch/risc-v/src/qemu-rv/qemu_rv_head.S @@ -43,11 +43,7 @@ __start: /* Preserve a1 as it contains the pointer to DTB */ - /* Load mhartid (cpuid) */ - -#ifndef CONFIG_ARCH_USE_S_MODE - csrr a0, CSR_MHARTID -#endif + /* Preserve a0 as it has mhartid */ /* Load the number of CPUs that the kernel supports */ li t1, CONFIG_SMP_NCPUS