From patchwork Thu Sep 18 23:22:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 37627 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5775E2054D for ; Thu, 18 Sep 2014 23:23:19 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id d1sf1137957wiv.3 for ; Thu, 18 Sep 2014 16:23:18 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=0t0jPyH+PdNa+X5Sif5c3HcW0FTSsBurmaIT8icLAp0=; b=BSzkUJOT5ZPsq8Dd6GTkrNahgaKabTGVBFs2OcfmqU80rVyM7SIOeLSvyPh+5KPlEo 39KccpQgrQpdOllvOnoKwYIzys9qqZk7XRy4qrBgf4SR7AMpK69nH9WrTyR+rNeQgzTv 19J2i5X3cpJlue1h4EzAVoEz27qrEVt1F630/5hLXPveSOxQk9G+wAJW67PLoUjE8nQ6 wlgWS8FmepwYh9IK1ilx1YR4oannCt3mO2XrEbNJma4MUn/dQZjgvQvIP4Dq4S2AXeDm Hh2iAte/+KC2JHZ+w+d95CurDAfAGo4vRQ9pMDR305carxzO+M9fUoPed8kSG/Q44TOh OQ0g== X-Gm-Message-State: ALoCoQmj+33KQdysshIg5bsI5qwqzSj7gEqQlA2rdoWaBlW3oIaYR0Ekcqm6gfKZCT/tt5yUpa3p X-Received: by 10.180.8.1 with SMTP id n1mr9457226wia.1.1411082598587; Thu, 18 Sep 2014 16:23:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.39 with SMTP id y7ls277118lag.0.gmail; Thu, 18 Sep 2014 16:23:18 -0700 (PDT) X-Received: by 10.152.27.200 with SMTP id v8mr2766055lag.53.1411082598263; Thu, 18 Sep 2014 16:23:18 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by mx.google.com with ESMTPS id rx10si190618lbb.76.2014.09.18.16.23.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Sep 2014 16:23:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id gi9so2139167lab.16 for ; Thu, 18 Sep 2014 16:23:18 -0700 (PDT) X-Received: by 10.152.20.1 with SMTP id j1mr2718435lae.57.1411082598145; Thu, 18 Sep 2014 16:23:18 -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.112.130.169 with SMTP id of9csp846021lbb; Thu, 18 Sep 2014 16:23:17 -0700 (PDT) X-Received: by 10.68.209.169 with SMTP id mn9mr10363228pbc.37.1411082596180; Thu, 18 Sep 2014 16:23:16 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fu3si215298pbb.74.2014.09.18.16.23.14 for ; Thu, 18 Sep 2014 16:23:16 -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 S1753944AbaIRXXL (ORCPT + 27 others); Thu, 18 Sep 2014 19:23:11 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:56450 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751418AbaIRXXJ (ORCPT ); Thu, 18 Sep 2014 19:23:09 -0400 Received: by mail-pd0-f174.google.com with SMTP id v10so2355748pde.19 for ; Thu, 18 Sep 2014 16:23:09 -0700 (PDT) X-Received: by 10.68.137.65 with SMTP id qg1mr10665740pbb.116.1411082588876; Thu, 18 Sep 2014 16:23:08 -0700 (PDT) Received: from flying-dutchman.swisscom.com (70-35-38-154.static.wiline.com. [70.35.38.154]) by mx.google.com with ESMTPSA id i1sm105843pdf.46.2014.09.18.16.23.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Sep 2014 16:23:06 -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 , Amit Pundir Subject: [PATCH v2] PM: Print pending wakeup IRQ preventing suspend Date: Fri, 19 Sep 2014 04:52:35 +0530 Message-Id: <1411082555-4425-1-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 1.9.1 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.215.43 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 such situation, this patch prints the IRQ number and action name of that pending wakeup irq. Cc: Pavel Machek Cc: Thomas Gleixner Cc: Rafael J. Wysocki Cc: Len Brown Cc: linux-pm@vger.kernel.org Cc: Android Kernel Team Acked-by: Pavel Machek Signed-off-by: Todd Poynor [Amit Pundir: Reworded the commit message] Signed-off-by: Amit Pundir Acked-by: Pavel Machek --- Resending this patch assuming that it might have got lost in between merge window rush last time and now people might have some time to look at it. 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; } /*