Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbZCKJ55 (ORCPT ); Wed, 11 Mar 2009 05:57:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753868AbZCKJ5n (ORCPT ); Wed, 11 Mar 2009 05:57:43 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:49305 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752527AbZCKJ5n (ORCPT ); Wed, 11 Mar 2009 05:57:43 -0400 From: "Rafael J. Wysocki" To: pm list Subject: [PATCH 0/10] PM: Rework suspend-resume ordering to avoid problems with shared interrupts (updated) Date: Wed, 11 Mar 2009 10:30:37 +0100 User-Agent: KMail/1.11.1 (Linux/2.6.29-rc7-tst; KDE/4.2.1; x86_64; ; ) Cc: LKML , Linus Torvalds , Ingo Molnar , "Eric W. Biederman" , Benjamin Herrenschmidt , Jeremy Fitzhardinge , Len Brown , Jesse Barnes , Thomas Gleixner , Frans Pop , Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= References: <200902221837.49396.rjw@sisk.pl> In-Reply-To: <200902221837.49396.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903111030.39371.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3126 Lines: 63 Hi, The last iteration of this series of patches didn't draw comments except for the discussion about the "wake-up" interrupts, so here's an update that I'd like to consider as more-or-less final. I would also like to use a separate 'suspend' git tree for merging these patches, if you don't mind. The following patches modifiy the way in which we handle disabling interrupts during suspend and enabling them during resume. They also change the ordering of the core suspend and hibernation code to take advantage of the new approach to the interrupts and modify the PCI PM core to avoid a few problems. Namely, interrupts are currently disabled on the boot CPU as soon as the nonboot CPUs have been disabled, which doesn't allow device drivers' "late" suspend and "early" resume callbacks to sleep. Among other things this means they cannot execute ACPI AML routines, which leads to problems with suspend-resume of PCI devices, as recently discussed. 1/10 modifies the [suspend|hibernation] and resume code, as well as the other code using the device PM framework, so that device drivers will not receive interrupts during the "late" suspend phase, although interrupts will only be disabled on the CPU right before calling sysdev_suspend() (and analogously during resume). 2/10 - 4/10 modify the suspend, hibernation and kexec jump code, respectively, so that the "late" phase of suspending devices will happen before executing the platform "prepare" callback and disabling nonboot CPUs (and analogously during resume). 5/10 is a patch that's already in the PCI linux-next tree and I included it in the series, because the next patches depend on it. 6/10 makes the PCI PM core use pci_set_power_state() to put devices into D0 during early resume, which allows the platform-specific operations to be carried out at that time, if necessary. 7/10 uses the opportunity to move pci_restore_standard_config() to pci-driver.c, where it belongs IMO. 8/10 makes the PCI PM core code put devices into low power states during the "late" phase of suspend which allows us to avoid a long-standing race related to shared interrupts and to handle devices that require some platform-specific operations to be put into low power states appropriately at the same time. [The second rev of the patch retains the current behavior during the "power-off" phase of hibernation, which is that the devices without drivers or without PM support in the drivers are not power managed by the core.] 9/10 fixes pci_set_power_state() so that it doesn't return error code when attempting to put a PCI device without PM support (either native or through the platform) into D0 (such devices are always in D0). 10/10 makes the PCI PM core save and restore the configuration spaces of devices that have no drivers or no PM support in the drivers during suspend and resume, respectively. Thanks, 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/