Skip to content

Commit 8ed4f3e

Browse files
committed
x86/smpboot: Set online before setting up vectors
There is no reason to set the CPU online after establishing the vectors on the upcoming CPU. The vector space is protected by the vector lock so no changes can happen. Marking the CPU online before setting up the vector space makes tracing work in the early vector management cpu online code. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Juergen Gross <[email protected]> Tested-by: Yu Chen <[email protected]> Acked-by: Juergen Gross <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: Tony Luck <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Alok Kataria <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Rui Zhang <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Dan Williams <[email protected]> Cc: Len Brown <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 65d7ed5 commit 8ed4f3e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/x86/kernel/smpboot.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ static void notrace start_secondary(void *unused)
254254
check_tsc_sync_target();
255255

256256
/*
257-
* Lock vector_lock and initialize the vectors on this cpu
258-
* before setting the cpu online. We must set it online with
259-
* vector_lock held to prevent a concurrent setup/teardown
260-
* from seeing a half valid vector space.
257+
* Lock vector_lock, set CPU online and bring the vector
258+
* allocator online. Online must be set with vector_lock held
259+
* to prevent a concurrent irq setup/teardown from seeing a
260+
* half valid vector space.
261261
*/
262262
lock_vector_lock();
263-
lapic_online();
264263
set_cpu_online(smp_processor_id(), true);
264+
lapic_online();
265265
unlock_vector_lock();
266266
cpu_set_state_online(smp_processor_id());
267267
x86_platform.nmi_init();

0 commit comments

Comments
 (0)