From patchwork Mon Aug 25 09:55:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 4773421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0A2469F3B4 for ; Mon, 25 Aug 2014 09:59:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75B322012B for ; Mon, 25 Aug 2014 09:59:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65FF920103 for ; Mon, 25 Aug 2014 09:59:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XLr0Z-0005XN-O9; Mon, 25 Aug 2014 09:56:15 +0000 Received: from galois.linutronix.de ([2001:470:1f0b:db:abcd:42:0:1]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XLr0X-0005QV-4H for linux-arm-kernel@lists.infradead.org; Mon, 25 Aug 2014 09:56:14 +0000 Received: from localhost ([127.0.0.1]) by Galois.linutronix.de with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XLr09-0005Iq-0o; Mon, 25 Aug 2014 11:55:49 +0200 Date: Mon, 25 Aug 2014 11:55:48 +0200 (CEST) From: Thomas Gleixner To: Sudeep Holla Subject: Re: [PATCH] arm: use cpu_online_mask when using forced irq_set_affinity In-Reply-To: <53C79E43.6040009@arm.com> Message-ID: References: <1399653640-21559-1-git-send-email-sudeep.holla@arm.com> <20140523121032.GV3693@n2100.arm.linux.org.uk> <537F4453.5000709@arm.com> <53A43174.503@arm.com> <20140620151638.GS32514@n2100.arm.linux.org.uk> <53C79E43.6040009@arm.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140825_025613_325502_65065615 X-CRM114-Status: GOOD ( 17.07 ) X-Spam-Score: -0.0 (/) Cc: Mark Rutland , Russell King - ARM Linux , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 17 Jul 2014, Sudeep Holla wrote: > > > Any suggestions on this ? Since commit 01f8fa4f01d8 and ffde1de64012 are > > > now in > > > stable releases, CPU0 hotplug is broken there now. > > > > Maybe we should ask Thomas, as he's (a) the maintainer of the irqchip > > stuff, and (b) the author of the patch causing the breakage. > > > > From what I can see looking at the x86 code, the work-around in > > ffde1de64012 is wrong. > > > > Can provide your thoughts on how to solve this issue ? ffde1de64012 is not about offlining a cpu, it's about onlining where we need to make sure that we assign the affinity to a not yet online marked cpu. > Is it expected from all the irqchip implementation to use force flag in > irq_set_affinity to ignore cpu_online_mask similar to GIC ? No, it's only relevant for the cases where we need to route irqs to not yet online cpus. Now the wreckage of offlining was definitely not intended and I wonder why set_affinity() is called there with force = true. This was introduced in commit 1dbfa187dad. I acked it back then, but I have no idea why, because the force argument did not have any effect at that time. Changing it to false should solve the issue. Thanks, tglx diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 2c4257604513..5c4d38e32a51 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -175,7 +175,7 @@ static bool migrate_one_irq(struct irq_desc *desc) c = irq_data_get_irq_chip(d); if (!c->irq_set_affinity) pr_debug("IRQ%u: unable to set affinity\n", d->irq); - else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret) + else if (c->irq_set_affinity(d, affinity, false) == IRQ_SET_MASK_OK && ret) cpumask_copy(d->affinity, affinity); return ret;