From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] PM: acquire device locks prior to suspending Date: Thu, 13 Dec 2007 23:20:15 -0800 Message-ID: <20071213232015.3e58936e.akpm@linux-foundation.org> References: <20071212234201.a8932915.akpm@linux-foundation.org> <200712131758.38116.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200712131758.38116.rjw@sisk.pl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: "Rafael J. Wysocki" Cc: linux-pm@lists.linux-foundation.org List-Id: linux-pm@vger.kernel.org On Thu, 13 Dec 2007 17:58:37 +0100 "Rafael J. Wysocki" wrote: > On Thursday, 13 of December 2007, Andrew Morton wrote: > > On Fri, 21 Sep 2007 15:37:40 -0400 (EDT) Alan Stern wrote: > > > > > This patch (as994) reorganizes the way suspend and resume > > > notifications are sent to drivers. The major changes are that now the > > > PM core acquires every device semaphore before calling the methods, > > > and calls to device_add() during suspends will fail. > > > > Causes my t61p to deadlock during suspend-to-RAM. Really late - the little > > moon symbol has started to flash but the LCD is still powered and the > > cursor still blinks. Only a poweroff restores control. > > Most probably, one of the drivers or a CPU hotplug notifier unregisters a > device during suspend (wrong). Not much is coming out over netconsole. Disabling netconsole doesn't work around this bug. > Please boot with no_console_suspend and check if the box survives (with this > patch applied): > > # echo 8 > /proc/sys/kernel/printk > # echo processors > /sys/power/pm_test > # echo mem > /sys/power/state http://userweb.kernel.org/~akpm/pc131696.jpg It hangs in the same way. > If it doesn't, you can try > > # echo platform > /sys/power/pm_test > # echo mem > /sys/power/state It gets here: http://userweb.kernel.org/~akpm/pc131697.jpg then locks up. > and > > # echo devices > /sys/power/pm_test > # echo mem > /sys/power/state It gets here: http://userweb.kernel.org/~akpm/pc131698.jpg then locks up. I spent a bit of time ding crude debugging hacks but ran out of patience..