From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753165AbcAPVVF (ORCPT ); Sat, 16 Jan 2016 16:21:05 -0500 Received: from terminus.zytor.com ([198.137.202.10]:56690 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753140AbcAPVVB (ORCPT ); Sat, 16 Jan 2016 16:21:01 -0500 Date: Sat, 16 Jan 2016 13:19:58 -0800 From: tip-bot for Thomas Gleixner Message-ID: Cc: jiang.liu@linux.intel.com, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, linux@roeck-us.net, bp@alien8.de, jmmahler@gmail.com, joe.lawrence@stratus.com, mingo@kernel.org Reply-To: bp@alien8.de, linux@roeck-us.net, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, joe.lawrence@stratus.com, jmmahler@gmail.com, linux-kernel@vger.kernel.org, jiang.liu@linux.intel.com In-Reply-To: <20151231160107.045961667@linutronix.de> References: <20151231160107.045961667@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/irq: Remove outgoing CPU from vector cleanup mask Git-Commit-ID: 56d7d2f4bbd00fb198b7907cb3ab657d06115a42 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 56d7d2f4bbd00fb198b7907cb3ab657d06115a42 Gitweb: http://git.kernel.org/tip/56d7d2f4bbd00fb198b7907cb3ab657d06115a42 Author: Thomas Gleixner AuthorDate: Thu, 31 Dec 2015 16:30:52 +0000 Committer: Thomas Gleixner CommitDate: Fri, 15 Jan 2016 13:44:01 +0100 x86/irq: Remove outgoing CPU from vector cleanup mask We want to synchronize new vector assignments with a pending cleanup. Remove a dying cpu from a pending cleanup mask. Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Tested-by: Joe Lawrence Cc: Jiang Liu Cc: Jeremiah Mahler Cc: andy.shevchenko@gmail.com Cc: Guenter Roeck Cc: stable@vger.kernel.org #4.3+ Link: http://lkml.kernel.org/r/20151231160107.045961667@linutronix.de Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/vector.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 91dc274..a7fa11e 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -633,9 +633,23 @@ void irq_complete_move(struct irq_cfg *cfg) void irq_force_complete_move(int irq) { struct irq_cfg *cfg = irq_cfg(irq); + struct apic_chip_data *data; + + if (!cfg) + return; - if (cfg) - __irq_complete_move(cfg, cfg->vector); + __irq_complete_move(cfg, cfg->vector); + + /* + * Remove this cpu from the cleanup mask. The IPI might have been sent + * just before the cpu was removed from the offline mask, but has not + * been processed because the CPU has interrupts disabled and is on + * the way out. + */ + raw_spin_lock(&vector_lock); + data = container_of(cfg, struct apic_chip_data, cfg); + cpumask_clear_cpu(smp_processor_id(), data->old_domain); + raw_spin_unlock(&vector_lock); } #endif