Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753048AbXKSVgS (ORCPT ); Mon, 19 Nov 2007 16:36:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751417AbXKSVgK (ORCPT ); Mon, 19 Nov 2007 16:36:10 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:40003 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750921AbXKSVgJ (ORCPT ); Mon, 19 Nov 2007 16:36:09 -0500 From: "Rafael J. Wysocki" To: Rudolf Marek Subject: Re: broken suspend [Was: 2.6.24-rc2-mm1] Date: Mon, 19 Nov 2007 22:53:40 +0100 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: Alan Stern , Jiri Slaby , Andrew Morton , Greg KH , Kernel development list , Linux-pm mailing list , lm-sensors@lm-sensors.org References: <4741EB91.9080000@assembler.cz> In-Reply-To: <4741EB91.9080000@assembler.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711192253.41532.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1799 Lines: 39 On Monday, 19 of November 2007, Rudolf Marek wrote: > Hello all, > >>> gives coretemp_cpu_callback -> coretemp_device_remove -> > >>> platform_device_unregister, so coretemp seems to be what I have and you don't. > > > > Yes. > > > > For the coretemp developers: coretemp_cpu_callback() needs to be more > > careful about what it does. During a system sleep transition (suspend, > > hibernate, resume) it isn't possible to register or unregister a > > device. Attempts to register will fail and attempts to unregister will > > block until the system sleep is over -- and for this callback that > > means hanging. > > Well I wrote the driver. Thanks for the clarification. If I recall correctly I > looked how this part should be done from others drivers. Now while checking > what happened to the file, seems Rafael added something related. > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d Well, in principle you can use the observation that the _FROZEN versions are used during suspend/hibernation. Thus, if you only unregister the device for CPU_DEAD, but you won't do that for CPU_DEAD_FROZEN, it will work as long as the freezer is there. > > It's not clear what the best way is to fix this. Perhaps the CPU > > notification should be sent along with a special flag indicating that > > the CPU transition is part of a system sleep (although this seems > > racy). In fact, it's already done that way and I don't think it's racy (see above). Greetings, Rafael - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/