diff options
author | Lukas Auer <lukas.auer@aisec.fraunhofer.de> | 2019-12-08 23:28:51 +0100 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2019-12-10 08:23:10 +0800 |
commit | 90ae28143700bae4edd23930a7772899ad259058 (patch) | |
tree | 302fd5ab611f913831da41971eb582270f7295b0 /arch/riscv/lib/spl.c | |
parent | 8b3e97badf97d6e399014fb4a152031f8a0c94ba (diff) |
riscv: add option to wait for ack from secondary harts in smp functions
Add a wait option to smp_call_function() to wait for the secondary harts
to acknowledge the call-function request. The request is considered to
be acknowledged once each secondary hart has cleared the corresponding
IPI.
As part of the call-function request, the secondary harts invalidate the
instruction cache after clearing the IPI. This adds a delay between
acknowledgment (clear IPI) and fulfillment (call function) of the
request. We want to use the acknowledgment to be able to judge when the
request has been completed. Remove the delay by clearing the IPI after
cache invalidation and just before calling the function from the
request.
Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Rick Chen <rick@andestech.com>
Tested-by: Rick Chen <rick@andestech.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'arch/riscv/lib/spl.c')
-rw-r--r-- | arch/riscv/lib/spl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c index a544df0a2b..dc7577f751 100644 --- a/arch/riscv/lib/spl.c +++ b/arch/riscv/lib/spl.c @@ -41,7 +41,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) debug("image entry point: 0x%lX\n", spl_image->entry_point); #ifdef CONFIG_SMP - ret = smp_call_function(spl_image->entry_point, (ulong)fdt_blob, 0); + ret = smp_call_function(spl_image->entry_point, (ulong)fdt_blob, 0, 0); if (ret) hang(); #endif |