From: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
Tony Lindgren <tony@atomide.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Subject: [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq
Date: Sat, 7 Oct 2017 22:37:43 +0000 [thread overview]
Message-ID: <20171007223738.25013-1-alexander.levin@verizon.com> (raw)
From: Grygorii Strashko <grygorii.strashko@ti.com>
[ Upstream commit 09bb6e93956ae5175b96905b723ec879c3ca0765 ]
There are two reasons for reporting wakeup event when dedicated wakeup
IRQ is triggered:
- wakeup events accounting, so proper statistical data will be
displayed in sysfs and debugfs;
- there are small window when System is entering suspend during which
dedicated wakeup IRQ can be lost:
dpm_suspend_noirq()
|- device_wakeup_arm_wake_irqs()
|- dev_pm_arm_wake_irq(X)
|- IRQ is enabled and marked as wakeup source
[1]...
|- suspend_device_irqs()
|- suspend_device_irq(X)
|- irqd_set(X, IRQD_WAKEUP_ARMED);
|- wakup IRQ armed
The wakeup IRQ can be lost if it's triggered at point [1]
and not armed yet.
Hence, fix above cases by adding simple pm_wakeup_event() call in
handle_threaded_wake_irq().
Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling)
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
[ tony@atomide.com: added missing return to avoid warnings ]
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/base/power/wakeirq.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c
index 404d94c6c8bc..feba1b211898 100644
--- a/drivers/base/power/wakeirq.c
+++ b/drivers/base/power/wakeirq.c
@@ -141,6 +141,13 @@ static irqreturn_t handle_threaded_wake_irq(int irq, void *_wirq)
struct wake_irq *wirq = _wirq;
int res;
+ /* Maybe abort suspend? */
+ if (irqd_is_wakeup_set(irq_get_irq_data(irq))) {
+ pm_wakeup_event(wirq->dev, 0);
+
+ return IRQ_HANDLED;
+ }
+
/* We don't want RPM_ASYNC or RPM_NOWAIT here */
res = pm_runtime_resume(wirq->dev);
if (res < 0)
--
2.11.0
next reply other threads:[~2017-10-07 22:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-07 22:37 Levin, Alexander (Sasha Levin) [this message]
2017-10-07 22:37 ` [PATCH review for 4.4 02/24] mmc: s3cmci: include linux/interrupt.h for tasklet_struct Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 04/24] mfd: ab8500-sysctrl: Handle probe deferral Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 05/24] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 03/24] ARM: pxa: Don't rely on public mmc header to include leds.h Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 06/24] staging: rtl8712u: Fix endian settings for structs describing network packets Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 08/24] ext4: do not use stripe_width if it is not set Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 09/24] i2c: riic: correctly finish transfers Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 07/24] ext4: fix stripe-unaligned allocations Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 11/24] perf tools: Only increase index if perf_evsel__new_idx() succeeds Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i) Levin, Alexander (Sasha Levin)
2017-10-08 2:27 ` Icenowy Zheng
2017-10-24 2:19 ` Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 13/24] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 10/24] drm/amdgpu: when dpm disabled, also need to stop/start vce Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 12/24] [media] cx231xx: Fix I2C on Internal Master 3 Bus Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 16/24] scsi: aacraid: Process Error for response I/O Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 15/24] xen/manage: correct return value check on xenbus_scanf() Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 17/24] platform/x86: intel_mid_thermal: Fix module autoload Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 22/24] mei: return error on notification request to a disconnected client Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 18/24] staging: lustre: llite: don't invoke direct_IO for the EOF case Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 20/24] staging: lustre: ptlrpc: skip lock if export failed Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 21/24] [media] exynos4-is: fimc-is: Unmap region obtained by of_iomap() Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 24/24] [media] bt8xx: fix memory leak Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 23/24] s390/dasd: check for device error pointer within state change interrupts Levin, Alexander (Sasha Levin)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171007223738.25013-1-alexander.levin@verizon.com \
--to=alexander.levin@verizon.com \
--cc=grygorii.strashko@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=stable@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®