Re: [PATCH v7 5/9] x86/smpboot: Split up native_cpu_up into separate phases and document them

From: David Woodhouse
Date: Wed Feb 08 2023 - 07:04:07 EST


On Wed, 2023-02-08 at 18:03 +0800, Yuan Yao wrote:
>
> >   #endif
> > +       /*
> > +        * Sync point with do_wait_cpu_initialized(). On boot, all secondary
> > +        * CPUs reach this stage after receiving INIT/SIPI from do_cpu_up()
> > +        * in the x86/cpu:kick cpuhp stage. At the start of cpu_init() they
> > +        * will wait for do_wait_cpu_initialized() to set their bit in
> > +        * smp_callout_mask to release them.
>
> The last sentence of the comment looks confused. The fact is:
>
> For serial case, The BSP waits AP to set cpu_initialized_mask from
> wait_for_master_cpu() after fired INIT/SIPI, then AP starts to wait
> cpu_callout_mask set by BSP from do_boot_cpu().
>
> Or the comments below "Bringup step two:..." which also looks clear
> enough then above.


/*
* Sync point with do_wait_cpu_initialized(). Before proceeding through
* cpu_init(), the AP will call wait_for_master_cpu() which sets its
* bit in cpu_initialized_mask and then waits for the BSP to set its
* bit in cpu_callout_mask to release it.
*/
cpu_init_secondary();


Better?

Attachment: smime.p7s
Description: S/MIME cryptographic signature