diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S index 3a0ec6fd595691..82306cecfdcbef 100644 --- a/arch/riscv/kernel/entry.S +++ b/arch/riscv/kernel/entry.S @@ -45,8 +45,10 @@ * Computes: * a0 = &new_vmalloc[BIT_WORD(cpu)] * a1 = BIT_MASK(cpu) + * + * using lw instead of REG_L is because the thread_info.cpu field is 32 bits wide */ - REG_L a2, TASK_TI_CPU(tp) + lw a2, TASK_TI_CPU(tp) /* * Compute the new_vmalloc element position: * (cpu / 64) * 8 = (cpu >> 6) << 3