[PATCH v6 15/25] x86: mp: Add iterators for CPUs

Bin Meng bmeng.cn at gmail.com
Mon Jul 20 03:26:50 CEST 2020


On Fri, Jul 17, 2020 at 10:49 PM Simon Glass <sjg at chromium.org> wrote:
>
> It is convenient to iterate through the CPUs performing work on each one
> and processing the result. Add a few iterator functions which handle this.
> These can be used by any client code. It can call mp_run_on_cpus() on
> each CPU that is returned, handling them one at a time.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Reviewed-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
> ---
>
> (no changes since v4)
>
> Changes in v4:
> - Update mp_next_cpu() to stop if CONFIG_SMP_AP_WORK is not enabled
>
> Changes in v3:
> - Add more comments on how the iterators work
>
>  arch/x86/cpu/mp_init.c    | 63 +++++++++++++++++++++++++++++++++++++++
>  arch/x86/include/asm/mp.h | 42 ++++++++++++++++++++++++++
>  2 files changed, 105 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list