diff options
author | Christoph Hellwig <hch@lst.de> | 2019-04-15 11:14:37 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2019-04-25 14:51:10 -0700 |
commit | c637b911e0669753ba85f8d61f10ca4b8f441dd3 (patch) | |
tree | cbc8946f8f04d7236aebdfa7a4fe7a61c4c9ad92 /arch/riscv/kernel/head.S | |
parent | df16c40cbfb43fbd6d5d879585b268b131fa95eb (diff) | |
download | linux-stable-c637b911e0669753ba85f8d61f10ca4b8f441dd3.tar.gz linux-stable-c637b911e0669753ba85f8d61f10ca4b8f441dd3.tar.bz2 linux-stable-c637b911e0669753ba85f8d61f10ca4b8f441dd3.zip |
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>
Diffstat (limited to 'arch/riscv/kernel/head.S')
-rw-r--r-- | arch/riscv/kernel/head.S | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 9e3840d84d3e..62d2c9c85433 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -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 |