From patchwork Tue Apr 15 15:20:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 3993851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5DF4EBFF02 for ; Tue, 15 Apr 2014 15:23:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 22CA120212 for ; Tue, 15 Apr 2014 15:23:04 +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 49FDE20200 for ; Tue, 15 Apr 2014 15:23:03 +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 1Wa59m-0006Dc-Tw; Tue, 15 Apr 2014 15:20:18 +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 1Wa59j-00051H-PI for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 15:20:16 +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 1Wa59L-0006vH-78; Tue, 15 Apr 2014 17:19:51 +0200 Date: Tue, 15 Apr 2014 17:20:04 +0200 (CEST) From: Thomas Gleixner To: Krzysztof Kozlowski Subject: Re: [PATCH 1/3] clocksource: exynos_mct: Fix stall after CPU hotplugging In-Reply-To: <1397566023.29169.31.camel@AMDC1943> Message-ID: References: <1396011962-4467-1-git-send-email-k.kozlowski@samsung.com> <1397554445.29169.21.camel@AMDC1943> <534D25DC.4050400@linaro.org> <1397566023.29169.31.camel@AMDC1943> User-Agent: Alpine 2.02 (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-20140415_082015_991346_A1B04742 X-CRM114-Status: GOOD ( 20.78 ) X-Spam-Score: -0.7 (/) Cc: Kukjin Kim , Bartlomiej Zolnierkiewicz , Tomasz Figa , Daniel Lezcano , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Kyungmin Park , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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=-2.6 required=5.0 tests=BAYES_00,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 Tue, 15 Apr 2014, Krzysztof Kozlowski wrote: > On wto, 2014-04-15 at 14:28 +0200, Daniel Lezcano wrote: > > On 04/15/2014 11:34 AM, Krzysztof Kozlowski wrote: > > > On pi?, 2014-03-28 at 14:06 +0100, Krzysztof Kozlowski wrote: > > >> Fix stall after hotplugging CPU1. Affected are SoCs where Multi Core Timer > > >> interrupts are shared (SPI), e.g. Exynos 4210. The stall was a result of > > >> starting the CPU1 local timer not in L1 timer but in L0 (which is used > > >> by CPU0). > > > > > > Hi, > > > > > > Do you have any comments on these 3 patches? They fix the CPU stall on > > > Exynos4210 and also on Exynos3250 (Chanwoo Choi sent patches for it > > > recently). > > > > You describe this issue as impacting different SoC not only the exynos, > > right ? > > > > Do you know what other SoCs are impacted by this ? > > No, affected are only Exynos SoC-s. It was confirmed on Exynos4210 > (Trats board) and Exynos3250 (new SoC, patches for it were recently > posted by Chanwoo). > > Other Exynos SoC-s where MCT local timers use shared interrupts (SPI) > can also be affected. Candidates are Exynos 5250 and 5420 but I haven't > tested them. > > > I guess this issue is not reproducible just with the line below, we need > > a timer to expire right at the moment CPU1 is hotplugged, right ? > > Right. The timer must fire in short time between enabling local timer > for CPU1 and setting the affinity for IRQ. Why do you set the affinity in the CPU_ONLINE hotplug callback and not right away when the interrupt is requested? Thanks, tglx Index: linux-2.6/drivers/clocksource/exynos_mct.c =================================================================== --- linux-2.6.orig/drivers/clocksource/exynos_mct.c +++ linux-2.6/drivers/clocksource/exynos_mct.c @@ -430,6 +430,7 @@ static int exynos4_local_timer_setup(str evt->irq); return -EIO; } + irq_set_affinity(mct_irqs[MCT_L0_IRQ + cpu], cpumask_of(cpu)); } else { enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0); } @@ -461,12 +462,6 @@ static int exynos4_mct_cpu_notify(struct mevt = this_cpu_ptr(&percpu_mct_tick); exynos4_local_timer_setup(&mevt->evt); break; - case CPU_ONLINE: - cpu = (unsigned long)hcpu; - if (mct_int_type == MCT_INT_SPI) - irq_set_affinity(mct_irqs[MCT_L0_IRQ + cpu], - cpumask_of(cpu)); - break; case CPU_DYING: mevt = this_cpu_ptr(&percpu_mct_tick); exynos4_local_timer_stop(&mevt->evt);