From patchwork Tue Aug 18 12:56:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 7031181 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7FFA3C05AC for ; Tue, 18 Aug 2015 12:57:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B493420796 for ; Tue, 18 Aug 2015 12:57:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDB8D2062E for ; Tue, 18 Aug 2015 12:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752999AbbHRM50 (ORCPT ); Tue, 18 Aug 2015 08:57:26 -0400 Received: from www.linutronix.de ([62.245.132.108]:56858 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752668AbbHRM5Z (ORCPT ); Tue, 18 Aug 2015 08:57:25 -0400 Received: from localhost ([127.0.0.1]) by Galois.linutronix.de with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1ZRgS9-0001LU-7y; Tue, 18 Aug 2015 14:57:21 +0200 Date: Tue, 18 Aug 2015 14:56:57 +0200 (CEST) From: Thomas Gleixner To: "Rafael J. Wysocki" cc: Alexandra Yates , kristen.c.accardi@intel.com, linux-pm@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH v5] Report interrupt(s) that caused system wakeup In-Reply-To: <2470788.QaFQb9rj3y@vostro.rjw.lan> Message-ID: References: <1438919224-7003-2-git-send-email-alexandra.yates@linux.intel.com> <1996878.sZiHYD4sbd@vostro.rjw.lan> <2470788.QaFQb9rj3y@vostro.rjw.lan> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 18 Aug 2015, Rafael J. Wysocki wrote: > The original point was that if two wakeup interrupts happened at the same time, > it would be kind of moot which one was the "real" wakeup, but now that I think > about it, reporting the first one should be enough to catch suprious wakeups > anyway. So we can simply do the following: and manage the storage in the PM code. Thanks, tglx --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c index d22786a6dbde..46068a1e0e07 100644 --- a/kernel/irq/pm.c +++ b/kernel/irq/pm.c @@ -21,7 +21,7 @@ bool irq_pm_check_wakeup(struct irq_desc *desc) desc->istate |= IRQS_SUSPENDED | IRQS_PENDING; desc->depth++; irq_disable(desc); - pm_system_wakeup(); + pm_system_irq_wakeup(irq_desc_get_irq(desc)); return true; } return false;