From patchwork Fri Jul 6 04:49:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1162791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id B9F1ADF236 for ; Fri, 6 Jul 2012 04:54:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sn0VP-00066u-Um; Fri, 06 Jul 2012 04:51:00 +0000 Received: from [216.32.180.31] (helo=va3outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sn0Uw-00066b-Bd for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2012 04:50:31 +0000 Received: from mail128-va3-R.bigfish.com (10.7.14.237) by VA3EHSOBE008.bigfish.com (10.7.40.28) with Microsoft SMTP Server id 14.1.225.23; Fri, 6 Jul 2012 04:47:47 +0000 Received: from mail128-va3 (localhost [127.0.0.1]) by mail128-va3-R.bigfish.com (Postfix) with ESMTP id 3EDA51A0189; Fri, 6 Jul 2012 04:47:47 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: -2 X-BigFish: VS-2(zz98dI1432Izz1202hzzz2dh87h2a8h668h839h944hd25he96hf0ah107ah) X-FB-DOMAIN-IP-MATCH: fail Received: from mail128-va3 (localhost.localdomain [127.0.0.1]) by mail128-va3 (MessageSwitch) id 1341550065955686_3830; Fri, 6 Jul 2012 04:47:45 +0000 (UTC) Received: from VA3EHSMHS006.bigfish.com (unknown [10.7.14.249]) by mail128-va3.bigfish.com (Postfix) with ESMTP id D806E24004C; Fri, 6 Jul 2012 04:47:45 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS006.bigfish.com (10.7.99.16) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 6 Jul 2012 04:47:44 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.298.5; Thu, 5 Jul 2012 23:49:50 -0500 Received: from S2101-09.ap.freescale.net ([10.192.185.229]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id q664neJV030987; Thu, 5 Jul 2012 21:49:44 -0700 Date: Fri, 6 Jul 2012 12:49:47 +0800 From: Shawn Guo To: Russell King - ARM Linux Subject: Re: MX28 poweroff issue Message-ID: <20120706044944.GA20503@S2101-09.ap.freescale.net> References: <201207040030.36713.marex@denx.de> <20120704093823.8e74d48bc8d9918a9c80fbcf@kinali.ch> <201207041631.30107.marex@denx.de> <20120704151944.GB18739@n2100.arm.linux.org.uk> <20120705160855.GA20175@S2101-09.ap.freescale.net> <20120705201002.GB31508@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120705201002.GB31508@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: sigmatel.com X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.32.180.31 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: Marek Vasut , Otavio Salvador , Detlev Zundel , Attila Kinali , Fabio Estevam , Linux ARM kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Thu, Jul 05, 2012 at 09:10:02PM +0100, Russell King - ARM Linux wrote: > Yes, the general idea is that if the timer is running, and the watchdog > is running, and it detects that it's event thread doesn't occasionally > run, it will report a lockup. > > As other platforms seem to not exhibit the problem when we halt, and > endlessly spin with IRQs enabled, the question needs to be asked: what > is different with MX23/MX28 and why is it different. > Ha, it turns out that the only reason is mxs_defconfig has CONFIG_LOCKUP_DETECTOR enabled. > Yes, we can mask the problem by disabling interrupts - just like x86 > does - but that doesn't tell us why we have this apparant difference > in behaviours. I think we need to understand that before we start > heading down the path of disabling interrupts to get rid of this > problem. > > So, I think we need some analysis of what's going on here with platforms > that do _not_ exhibit the problem. I just reproduced the problem on imx53 with CONFIG_LOCKUP_DETECTOR enabled in imx_v6_v7_defconfig. I think if we enable the config for imx_v4_v5_defconfig, we will see the problem on imx27. Presumably, other platforms behave same on this. So would you consider the following change is a right fix? Regards, Shawn diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 19c95ea..693b744 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -247,6 +247,7 @@ void machine_shutdown(void) void machine_halt(void) { machine_shutdown(); + local_irq_disable(); while (1); } @@ -268,6 +269,7 @@ void machine_restart(char *cmd) /* Whoops - the platform was unable to reboot. Tell the user! */ printk("Reboot failed -- System halted\n"); + local_irq_disable(); while (1); }