[U-Boot] [PATCH v2 1/9] riscv: add infrastructure for calling functions on other harts

Anup Patel Anup.Patel at wdc.com
Wed Mar 6 03:55:04 UTC 2019



> -----Original Message-----
> From: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
> Sent: Wednesday, March 6, 2019 4:23 AM
> To: u-boot at lists.denx.de
> Cc: Atish Patra <Atish.Patra at wdc.com>; Anup Patel
> <Anup.Patel at wdc.com>; Bin Meng <bmeng.cn at gmail.com>; Andreas
> Schwab <schwab at suse.de>; Palmer Dabbelt <palmer at sifive.com>;
> Alexander Graf <agraf at suse.de>; Lukas Auer
> <lukas.auer at aisec.fraunhofer.de>; Anup Patel <anup at brainfault.org>; Rick
> Chen <rick at andestech.com>
> Subject: [PATCH v2 1/9] riscv: add infrastructure for calling functions on other
> harts
> 
> Harts on RISC-V boot independently, U-Boot is responsible for managing
> them. Functions are called on other harts with smp_call_function(), which
> sends inter-processor interrupts (IPIs) to all other available harts. Available
> harts are those marked as available in the device tree and present in the
> available_harts mask stored in global data. The available_harts mask is used
> to register all harts that have entered U-Boot. Functions are specified with
> their address and two function arguments (argument 2 and 3). The first
> function argument is always the hart ID of the hart calling the function. On
> the other harts, the IPI interrupt handler handle_ipi() must be called on
> software interrupts to handle the request and call the specified function.
> 
> Functions are stored in the ipi_data data structure. Every hart has its own
> data structure in global data. While this is not required at the moment (all
> harts are expected to boot Linux), this does allow future expansion, where
> other harts may be used for monitoring or other tasks.
> 
> Signed-off-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
> ---
> 
> Changes in v2:
> - Remove unneeded quotes from NR_CPUS Kconfig entry
> - Move memory barrier from send_ipi_many() to handle_ipi()
> - Add check in send_ipi_many so that IPIs are only sent to available harts as
> indicated by the available_harts mask

Reviewed-by: Anup Patel <anup.patel at wdc.com>

Regards,
Anup


More information about the U-Boot mailing list