From patchwork Fri Aug 1 16:30:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 34727 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 935E1202A1 for ; Fri, 1 Aug 2014 16:31:50 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id kx10sf29510552pab.8 for ; Fri, 01 Aug 2014 09:31:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=3MUroc3JFzqobfNH/mTeE5m7NS5a4wzIpzHhmfjSAbk=; b=d8DPPVwIoLDKbk4cxS4nprgBE3E2lmemWpNjU3XBq3Na5zKSabL6vGY4ASumhO+Eas aTAp62urXXFtDy3OpvMFUQIUJnwrWJ3utnNB71i1XKyhfT1Vf1nTxoAlwtG/YKTzfE8U nM1UdrMicltvS187xxGCS0CV/2unhcTPsMxnfMm/5y2dDigjNoMDxpTHsxEarxSjGmHa KxUITSOjL78DwytpReJsb8VdTDl+pnv7O/jOMBW3zRUQalhXnmq7RZ1kkS+xzb0+wmNa QhBbUznsrQr9u+a/j3IHFs5p1xxD1Am1Eb6ou64wrSpc4YX1Ldk/nFbSO+A/endy/ElS E/pQ== X-Gm-Message-State: ALoCoQlMZeJDZEa7aEn7LC9oIqoPNsWM1BJkIJWk36EqVWRquUfJqZQc9/q0QhCid6taXB9G2Pdz X-Received: by 10.66.145.33 with SMTP id sr1mr2591764pab.18.1406910709927; Fri, 01 Aug 2014 09:31:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.38 with SMTP id j35ls1574798qge.89.gmail; Fri, 01 Aug 2014 09:31:49 -0700 (PDT) X-Received: by 10.52.99.106 with SMTP id ep10mr3452970vdb.73.1406910709782; Fri, 01 Aug 2014 09:31:49 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id ag1si7784918vec.32.2014.08.01.09.31.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Aug 2014 09:31:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ik5so7074646vcb.34 for ; Fri, 01 Aug 2014 09:31:49 -0700 (PDT) X-Received: by 10.221.47.9 with SMTP id uq9mr7788629vcb.48.1406910709700; Fri, 01 Aug 2014 09:31:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp123648vcb; Fri, 1 Aug 2014 09:31:49 -0700 (PDT) X-Received: by 10.66.102.70 with SMTP id fm6mr7496067pab.55.1406910708628; Fri, 01 Aug 2014 09:31:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rn13si10354797pab.178.2014.08.01.09.31.48 for ; Fri, 01 Aug 2014 09:31:48 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755297AbaHAQbq (ORCPT + 19 others); Fri, 1 Aug 2014 12:31:46 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:37725 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139AbaHAQbp (ORCPT ); Fri, 1 Aug 2014 12:31:45 -0400 Received: by mail-pd0-f169.google.com with SMTP id y10so5852322pdj.0 for ; Fri, 01 Aug 2014 09:31:44 -0700 (PDT) X-Received: by 10.70.128.164 with SMTP id np4mr4157375pdb.168.1406910704903; Fri, 01 Aug 2014 09:31:44 -0700 (PDT) Received: from localhost.localdomain ([106.51.243.250]) by mx.google.com with ESMTPSA id ee5sm9163129pbc.47.2014.08.01.09.31.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Aug 2014 09:31:43 -0700 (PDT) From: Amit Pundir To: linux-kernel@vger.kernel.org Cc: Todd Poynor , Pavel Machek , Thomas Gleixner , "Rafael J. Wysocki" , Len Brown , linux-pm@vger.kernel.org, Android Kernel Team , John Stultz , Sumit Semwal , Amit Pundir Subject: [RFC][PATCH 1/2] PM: Print pending wakeup IRQ preventing suspend to dmesg Date: Fri, 1 Aug 2014 22:00:48 +0530 Message-Id: <1406910649-4028-2-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1406910649-4028-1-git-send-email-amit.pundir@linaro.org> References: <1406910649-4028-1-git-send-email-amit.pundir@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: amit.pundir@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Todd Poynor Currently when a pending wakeup irq stops suspend, it can be difficult to determine why suspend was prevented and which IRQ was actually responsible. In order to help debug these situations, this patch prints the IRQ number and action name of that pending wakeup irq which prevents suspend. This patch comes from the Android patch set, where its been used to debug suspend problems. Cc: Pavel Machek Cc: Thomas Gleixner Cc: Rafael J. Wysocki Cc: Len Brown Cc: linux-pm@vger.kernel.org Cc: Android Kernel Team Cc: John Stultz Cc: Sumit Semwal Signed-off-by: Todd Poynor [Amit Pundir: Reworded the commit message] Signed-off-by: Amit Pundir Acked-by: Pavel Machek --- kernel/irq/pm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c index abcd6ca..c2bc8d9 100644 --- a/kernel/irq/pm.c +++ b/kernel/irq/pm.c @@ -109,8 +109,13 @@ int check_wakeup_irqs(void) * can abort suspend. */ if (irqd_is_wakeup_set(&desc->irq_data)) { - if (desc->depth == 1 && desc->istate & IRQS_PENDING) + if (desc->depth == 1 && desc->istate & IRQS_PENDING) { + pr_info("Wakeup IRQ %d %s pending, suspend aborted\n", + irq, + desc->action && desc->action->name ? + desc->action->name : ""); return -EBUSY; + } continue; } /*