From patchwork Mon Jul 11 00:04:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Cross X-Patchwork-Id: 962802 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6B06q5W026854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 11 Jul 2011 00:07:13 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p6B04saZ029198; Sun, 10 Jul 2011 17:04:56 -0700 Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p6B04ohm029189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 10 Jul 2011 17:04:52 -0700 Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id p6B04j2w031337; Sun, 10 Jul 2011 17:04:45 -0700 Received: from walnut.mtv.corp.google.com (walnut.mtv.corp.google.com [172.18.102.62]) by wpaz29.hot.corp.google.com with ESMTP id p6B04cGv017883; Sun, 10 Jul 2011 17:04:38 -0700 Received: by walnut.mtv.corp.google.com (Postfix, from userid 99897) id 8225425771D; Sun, 10 Jul 2011 17:04:38 -0700 (PDT) From: Colin Cross To: linux-pm@lists.linux-foundation.org Date: Sun, 10 Jul 2011 17:04:26 -0700 Message-Id: <1310342666-2493-1-git-send-email-ccross@android.com> X-Mailer: git-send-email 1.7.4.1 X-System-Of-Record: true Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-6.101 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SPF_PASS, OSDL_HEADER_SUBJECT_BRACKETED, PATCH_SUBJECT_OSDL, SARE_SUB_OBFU_Q1 X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: Thomas Gleixner , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Colin Cross Subject: [linux-pm] [PATCH] PM: Reintroduce dropped call to check_wakeup_irqs X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 11 Jul 2011 00:07:13 +0000 (UTC) Patch 2e711c04dbbf7a7732a3f7073b1fc285d12b369d (PM: Remove sysdev suspend, resume and shutdown operations) deleted sysdev_suspend, which was being relied on to call check_wakeup_irqs in suspend. If check_wakeup_irqs is not called, wake interrupts that are pending when suspend is entered may be lost. It also breaks IRQCHIP_MASK_ON_SUSPEND, which is handled in check_wakeup_irqs. This patch adds a call to check_wakeup_irqs in syscore_suspend, similar to what was deleted in sysdev_suspend. CC: Rafael J. Wysocki CC: Thomas Gleixner CC: Greg Kroah-Hartman Signed-off-by: Colin Cross --- drivers/base/syscore.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/base/syscore.c b/drivers/base/syscore.c index c126db3..9b8bbe0 100644 --- a/drivers/base/syscore.c +++ b/drivers/base/syscore.c @@ -9,6 +9,7 @@ #include #include #include +#include static LIST_HEAD(syscore_ops_list); static DEFINE_MUTEX(syscore_ops_lock); @@ -48,6 +49,13 @@ int syscore_suspend(void) struct syscore_ops *ops; int ret = 0; + pr_debug("Checking wake-up interrupts\n"); + + /* Return error code if there are any wake-up interrupts pending */ + ret = check_wakeup_irqs(); + if (ret) + return ret; + WARN_ONCE(!irqs_disabled(), "Interrupts enabled before system core suspend.\n");