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


Groups > linux.kernel > #1731904 > unrolled thread

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

Started byThomas Gleixner <tglx@linutronix.de>
First post2017-09-13 23:40 +0200
Last post2017-09-13 23:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromThomas Gleixner <tglx@linutronix.de>
Date2017-09-13 23:40 +0200
Subject[patch 38/52] x86/smpboot: Set online before setting up vectors
Message-ID<upny3-4iM-45@gated-at.bofh.it>
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();

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web