riscv: simplify the stack pointer setup in head.S
We don't need THREAD_SIZE in asm-offsets.c as we can just calculate the value of init_thread_union + THREAD_SIZE using cpp, just like we do a few lines above. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
committed by
Palmer Dabbelt
parent
df16c40cbf
commit
c637b911e0
@@ -69,10 +69,7 @@ clear_bss_done:
|
||||
/* Restore C environment */
|
||||
la tp, init_task
|
||||
sw zero, TASK_TI_CPU(tp)
|
||||
|
||||
la sp, init_thread_union
|
||||
li a0, ASM_THREAD_SIZE
|
||||
add sp, sp, a0
|
||||
la sp, init_thread_union + THREAD_SIZE
|
||||
|
||||
/* Start the kernel */
|
||||
mv a0, s0
|
||||
|
||||
Reference in New Issue
Block a user