Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1731904

[patch 38/52] x86/smpboot: Set online before setting up vectors

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject [patch 38/52] x86/smpboot: Set online before setting up vectors
Date 2017-09-13 23:40 +0200
Message-ID <upny3-4iM-45@gated-at.bofh.it> (permalink)
References <upny2-4iM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


There is no reason to set the CPU online before 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 <tglx@linutronix.de>
---
 arch/x86/kernel/smpboot.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -251,14 +251,14 @@ static void notrace start_secondary(void
 	check_tsc_sync_target();
 
 	/*
-	 * Lock vector_lock and initialize the vectors on this cpu
-	 * before setting the cpu online. We must set it online with
-	 * vector_lock held to prevent a concurrent setup/teardown
-	 * from seeing a half valid vector space.
+	 * Lock vector_lock, set CPU online and bring the vector
+	 * allocator online. Online must be set with vector_lock held
+	 * to prevent a concurrent irq setup/teardown from seeing a
+	 * half valid vector space.
 	 */
 	lock_vector_lock();
-	lapic_online();
 	set_cpu_online(smp_processor_id(), true);
+	lapic_online();
 	unlock_vector_lock();
 	cpu_set_state_online(smp_processor_id());
 	x86_platform.nmi_init();

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[patch 38/52] x86/smpboot: Set online before setting up vectors Thomas Gleixner <tglx@linutronix.de> - 2017-09-13 23:40 +0200

csiph-web