From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikko Rapeli Subject: Re: [PATCH] twl4030 reboot workaround Date: Thu, 29 Jul 2010 09:06:45 +0300 Message-ID: <20100729060645.GE12063@edollo> References: <1265226207-22971-3-git-send-email-mturquette@ti.com> <1280310092-27260-1-git-send-email-ext-mikko.rapeli@nokia.com> <20100728101811.GA543@nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtp.nokia.com ([192.100.122.230]:35096 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345Ab0G2GHH (ORCPT ); Thu, 29 Jul 2010 02:07:07 -0400 Content-Disposition: inline In-Reply-To: <20100728101811.GA543@nokia.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "De-Schrijver Peter (Nokia-MS/Helsinki)" Cc: "linux-omap@vger.kernel.org" , "mturquette@ti.com" , "sameo@linux.intel.com" On Wed, Jul 28, 2010 at 12:18:11PM +0200, De-Schrijver Peter (Nokia-MS/Helsinki) wrote: > On Wed, Jul 28, 2010 at 11:41:32AM +0200, Rapeli Mikko (EXT-Ixonos/Oulu) > wrote: > > From: Mikko Rapeli > > > > Original patch: http://marc.info/?l=linux-omap&m=126522625032441&w=2 > > > > "Removes TWL4030 sleep script prior to rebooting, only on OMAP3. This is > > necessary since DPLL3 reset causes SYS_OFFMODE pin to go low, resulting > > in the sleep script being executed on TWL4030. This usually results in > > VDD1 & VDD2 voltage collapse while ROM code is executing, followed by an > > MPU Watch Dog reset or worse, an irrecoverable hang." > > > > Original patch resulted in a crash due to sleeping i2c calls late in the > > reboot sequence. Here's how to trigger the crash: > > > > # cat /dev/urandom > /foo & > > sync(); > > reboot(LINUX_REBOOT_CMD_RESTART2); > > > > Kernel trace from 2.6.32: > > > > Unable to handle kernel NULL pointer dereference at virtual address 00000000 > > pgd = c0004000 > > [00000000] *pgd=00000000 > > Internal error: Oops: 805 [#2] PREEMPT > > ... > > [] (exit_mmap+0x1d4/0x1f8) from [] (mmput+0x34/0x110) > > [] (mmput+0x34/0x110) from [] (exit_mm+0x140/0x180) > > [] (exit_mm+0x140/0x180) from [] (do_exit+0x5d8/0x6ac) > > [] (do_exit+0x5d8/0x6ac) from [] (die+0x2d4/0x2e0) > > [] (die+0x2d4/0x2e0) from [] (baddataabort+0x0/0x50) > > [] (baddataabort+0x0/0x50) from [] (i2c_transfer+0xec/0x104) > > [] (i2c_transfer+0xec/0x104) from [<00000001>] (0x1) > > > > Fix is to move reboot preparations into a reboot notifier. > > > > And what if we get an OMAP3 watchdog reset ? In this case there is no > software to remove the script... Well, I don't know. We have seen boot and reboot failures and this remove script patch set has helped to reduce those failures. -Mikko