From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933354AbcHJSNe (ORCPT ); Wed, 10 Aug 2016 14:13:34 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56788 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933081AbcHJSNb (ORCPT ); Wed, 10 Aug 2016 14:13:31 -0400 Date: Wed, 10 Aug 2016 11:10:26 -0700 From: tip-bot for Boris Ostrovsky Message-ID: Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, jgross@suse.com, mingo@kernel.org, torvalds@linux-foundation.org, anna-maria@linutronix.de, boris.ostrovsky@oracle.com, bigeasy@linutronix.de, hpa@zytor.com, peterz@infradead.org Reply-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, jgross@suse.com, torvalds@linux-foundation.org, mingo@kernel.org, hpa@zytor.com, peterz@infradead.org, anna-maria@linutronix.de, bigeasy@linutronix.de, boris.ostrovsky@oracle.com In-Reply-To: <1470244948-17674-3-git-send-email-boris.ostrovsky@oracle.com> References: <1470244948-17674-3-git-send-email-boris.ostrovsky@oracle.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] cpu/hotplug: Prevent alloc/free of irq descriptors during CPU up/down (again) Git-Commit-ID: aa877175e7a9982233ed8f10cb4bfddd78d82741 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: aa877175e7a9982233ed8f10cb4bfddd78d82741 Gitweb: http://git.kernel.org/tip/aa877175e7a9982233ed8f10cb4bfddd78d82741 Author: Boris Ostrovsky AuthorDate: Wed, 3 Aug 2016 13:22:28 -0400 Committer: Ingo Molnar CommitDate: Wed, 10 Aug 2016 15:42:57 +0200 cpu/hotplug: Prevent alloc/free of irq descriptors during CPU up/down (again) Now that Xen no longer allocates irqs in _cpu_up() we can restore commit: a89941816726 ("hotplug: Prevent alloc/free of irq descriptors during cpu up/down") Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Acked-by: Thomas Gleixner Cc: Anna-Maria Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: david.vrabel@citrix.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1470244948-17674-3-git-send-email-boris.ostrovsky@oracle.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/smpboot.c | 11 ----------- kernel/cpu.c | 8 ++++++++ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 2a6e84a..067de61 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1108,17 +1108,8 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) common_cpu_up(cpu, tidle); - /* - * We have to walk the irq descriptors to setup the vector - * space for the cpu which comes online. Prevent irq - * alloc/free across the bringup. - */ - irq_lock_sparse(); - err = do_boot_cpu(apicid, cpu, tidle); - if (err) { - irq_unlock_sparse(); pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu); return -EIO; } @@ -1136,8 +1127,6 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) touch_nmi_watchdog(); } - irq_unlock_sparse(); - return 0; } diff --git a/kernel/cpu.c b/kernel/cpu.c index 341bf80..ec12b72 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -349,8 +349,16 @@ static int bringup_cpu(unsigned int cpu) struct task_struct *idle = idle_thread_get(cpu); int ret; + /* + * Some architectures have to walk the irq descriptors to + * setup the vector space for the cpu which comes online. + * Prevent irq alloc/free across the bringup. + */ + irq_lock_sparse(); + /* Arch-specific enabling code. */ ret = __cpu_up(cpu, idle); + irq_unlock_sparse(); if (ret) { cpu_notify(CPU_UP_CANCELED, cpu); return ret;