
13 Jul
2020
13 Jul
'20
6:57 a.m.
On Wed, Jul 8, 2020 at 9:37 AM Simon Glass sjg@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@chromium.org Reviewed-by: Wolfgang Wallner wolfgang.wallner@br-automation.com
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@gmail.com