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

2023-07-23 Thread Leo Liang
On Sun, Jun 11, 2023 at 04:54:17PM -0700, Bo Gan wrote: > 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

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

2023-06-11 Thread Rick Chen
> From: Bo Gan > Sent: Monday, June 12, 2023 7:54 AM > To: u-boot@lists.denx.de > Cc: Bo Gan ; Rick Jian-Zhi Chen(陳建志) > ; Leo Yu-Chi Liang(梁育齊) ; Sean > Anderson ; Bin Meng ; Lukas Auer > > Subject: [RESEND PATCH v2] riscv: setup per-hart stack earlier > > Ha

[RESEND PATCH v2] riscv: setup per-hart stack earlier

2023-06-11 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