From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756640AbZCAWam (ORCPT ); Sun, 1 Mar 2009 17:30:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755946AbZCAWaM (ORCPT ); Sun, 1 Mar 2009 17:30:12 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:53550 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754393AbZCAWaJ (ORCPT ); Sun, 1 Mar 2009 17:30:09 -0500 From: "Rafael J. Wysocki" To: LKML Subject: [RFC][PATCH 0/4] Rework disabling of interrupts during suspend-resume Date: Sun, 1 Mar 2009 23:21:38 +0100 User-Agent: KMail/1.11.0 (Linux/2.6.29-rc5-tst; KDE/4.2.0; x86_64; ; ) Cc: Linus Torvalds , Ingo Molnar , "Eric W. Biederman" , Benjamin Herrenschmidt , Jeremy Fitzhardinge , pm list , Len Brown , Jesse Barnes , Thomas Gleixner , Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= , Alan Stern , Johannes Berg 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: <200903012321.40328.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 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. 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/4 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). [Ingo, I didn't add your ACK to the patch, because it's changed since you saw it last time.] 2/4 - 4/4 modify the suspend, hibernation and kexec jump code, respectively, so that the "late" phase of suspending devices will happen before the platform "prepare" callback and the disabling of nonboot CPUs (and analogously during resume). Comments welcome. Thanks, Rafael