]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/smpboot: Split up native_cpu_up into separate phases
authorDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 28 Jan 2021 16:12:14 +0000 (16:12 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 28 Jan 2021 20:11:58 +0000 (20:11 +0000)
commita0d22d43b098b19b0e2affc0b6e0176e371aea32
treee090b8d3b43464d285f0cec95731fa8a9abcc260
parent2b6fb4700ccf3283b37225ec0987bf3704de6855
x86/smpboot: Split up native_cpu_up into separate phases

There are four logical parts to what native_cpu_up() does.

First it actually wakes AP.

Second, it waits for the AP to make it as far as wait_for_master_cpu()
which sets that CPU's bit in cpu_initialized_mask, and sets the bit in
cpu_callout_mask to let the AP proceed through cpu_init().

Then, it waits for the AP to finish cpu_init() and get as far as the
smp_callin() call, which sets that CPU's bit in cpu_callin_mask.

Finally, it does the TSC synchronization and waits for the AP to actually
mark itself online in cpu_online_mask.

This commit should have no behavioural change, but merely splits those
phases out into separate functions so that future commits and make them
happen in parallel for all APs.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kernel/smpboot.c