Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209238

Re: [PATCH v5] Report interrupt(s) that caused system wakeup

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v5] Report interrupt(s) that caused system wakeup
Date 2015-08-18 15:00 +0200
Message-ID <pYOEF-6Gh-3@gated-at.bofh.it> (permalink)
References <pUY9A-4vn-5@gated-at.bofh.it> <pUY9A-4vn-3@gated-at.bofh.it> <pYzFE-1GH-17@gated-at.bofh.it> <pYBo5-4bu-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5] Report interrupt(s) that caused system wakeup "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-08-08 00:20 +0200
  Re: [PATCH v5] Report interrupt(s) that caused system wakeup Thomas Gleixner <tglx@linutronix.de> - 2015-08-17 23:00 +0200
    Re: [PATCH v5] Report interrupt(s) that caused system wakeup "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-08-18 00:50 +0200
      Re: [PATCH v5] Report interrupt(s) that caused system wakeup Thomas Gleixner <tglx@linutronix.de> - 2015-08-18 15:00 +0200
        Re: [PATCH v5] Report interrupt(s) that caused system wakeup "Rafael J. Wysocki" <rafael@kernel.org> - 2015-08-18 18:00 +0200

csiph-web