Re: [PATCH RFC v1 1/8] cpu/hotplug: Allow architecture-specific primary CPU bringup
From: Borislav Petkov
Date: Tue Sep 29 2026 - 20:21:21 EST
On Sat, Sep 12, 2026 at 12:08:07AM +0000, Chang S. Bae wrote:
> Parallel CPU bringup currently proceeds in two phases: first for the SMT
> primary threads and then second for the remaining secondary threads. This
> ordering avoids race conditions, specifically for x86 microcode loading.
>
> Upcoming x86 changes expand the microcode loading scope beyond a single
> core to package scope or even system-wide updates. Introduce architecture
> hooks that allow customizing which CPUs participate in the first phase:
>
> * arch_cpuhp_primary_aware() - indicates whether the architecture
> provides a custom primary CPU selection scheme, or not.
>
> * arch_cpuhp_get_primary_cpus() - returns a CPU mask for the first
> bringup iteration.
Why are there two?
Why are there even accessors at all when you can simply use
cpu_primary_thread_mask whereever you need it and drop all that gunk here and
in the next patch?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette