Re: [PATCH] riscv: setup per-hart stack earlier

2023-05-20 Thread Bo Gan
On 5/14/23 10:08 PM, Rick Chen wrote: Hi Bo Gan, It builds fail as below: arch/riscv/cpu/start.S:97: Error: illegal operands `li t0,CONFIG_SYS_INIT_SP_ADDR' Thanks, Rick Hi Rick & Leo, Please help take a look at v2 of the patch: https://patchwork.ozlabs.org/project/uboot/patch/1684650044-31

Re: [PATCH] riscv: setup per-hart stack earlier

2023-05-14 Thread Rick Chen
Hi Bo Gan, > From: Bo Gan > Sent: Tuesday, May 09, 2023 9:46 AM > To: u-boot@lists.denx.de > Cc: Bo Gan ; Rick Jian-Zhi Chen(陳建志) > ; Leo Yu-Chi Liang(梁育齊) > Subject: [PATCH] riscv: setup per-hart stack earlier > > Harts need to use per-hart stack before any fun

[PATCH] riscv: setup per-hart stack earlier

2023-05-09 Thread Bo Gan
Harts need to use per-hart stack before any function call, even if that function is a simple one. When the callee uses stack for register save/ restore, especially RA, if nested call, concurrent access by multiple harts on the same stack will cause data-race. This patch sets up SP before `board_in