From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbbHRM50 (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 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 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 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; and manage the storage in the PM code. Thanks, tglx