diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-09-13 23:29:40 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-09-25 20:51:57 +0200 |
commit | 8ed4f3e66665cd186bc6b1d35f25a481e35c62ab (patch) | |
tree | 9e1ef7f2a713e528973fba986471d53478cba0a7 /arch/x86 | |
parent | 65d7ed57bd9708d562a37fa3f99bf9fd62052b9e (diff) | |
download | linux-8ed4f3e66665cd186bc6b1d35f25a481e35c62ab.tar.gz linux-8ed4f3e66665cd186bc6b1d35f25a481e35c62ab.tar.bz2 linux-8ed4f3e66665cd186bc6b1d35f25a481e35c62ab.zip |
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 <tglx@linutronix.de>
Tested-by: Juergen Gross <jgross@suse.com>
Tested-by: Yu Chen <yu.c.chen@intel.com>
Acked-by: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Rui Zhang <rui.zhang@intel.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Len Brown <lenb@kernel.org>
Link: https://lkml.kernel.org/r/20170913213155.264311994@linutronix.de
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 91c0d1cd651e..86739f04701b 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -254,14 +254,14 @@ static void notrace start_secondary(void *unused) 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(); |