On Fri, Feb 14, 2025, Nicolas Saenz Julienne wrote: > x86 is the only architecture that defines set/clear_bit() as non-atomic. > This makes it incompatible with arch-agnostic code that might implicitly > require atomicity. And it was observed to corrupt the 'online_cpus' > bitmap, as non BSP CPUs perform RmWs on the bitmap concurrently during > bring up. See: > > ap_start64() > save_id() > set_bit(apic_id(), online_cpus) > > Address this by making set/clear_bit() atomic. OMG, this is arguaby worse than the per-CPU stack/data mess. *sigh* I'll grab this, I'm putting together a pull request for a few things.