From: Nishanth Menon <nm@ti.com> To: Kevin <khilman@ti.com> Cc: Colin <ccross@google.com>, linux-arm <linux-arm-kernel@lists.infradead.org>, linux-omap <linux-omap@vger.kernel.org>, Nishanth Menon <nm@ti.com> Subject: [PATCH 1/2] OMAP3+: PM: SR: use put_sync_suspend for disabling Date: Fri, 22 Jul 2011 00:55:52 -0500 [thread overview] Message-ID: <1311314153-23531-2-git-send-email-nm@ti.com> (raw) In-Reply-To: <1311314153-23531-1-git-send-email-nm@ti.com> From: Colin Cross <ccross@google.com> omap_sr_disable_reset_volt is called with irqs off in omapx_enter_sleep, as part of idle sequence, this eventually calls sr_disable and pm_runtime_put_sync. pm_runtime_put_sync calls rpm_idle, which will enable interrupts in order to call the callback. In this short interval when interrupts are enabled, scenarios such as the following can occur: while interrupts are enabled, the timer interrupt that is supposed to wake the device out of idle occurs and is acked, so when the CPU finally goes to off, the timer is already gone, missing a wakeup event. Further, as the documentation for runtime states:" However, subsystems can use the pm_runtime_irq_safe() helper function to tell the PM core that a device's ->runtime_suspend() and ->runtime_resume() callbacks should be invoked in atomic context with interrupts disabled (->runtime_idle() is still invoked the default way)." Hence, replace pm_runtime_put_sync with pm_runtime_put_sync_suspend to invoke the suspend handler and shut off the fclk for SmartReflex module instead of using the idle handler in interrupt disabled context. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Colin Cross <ccross@google.com> --- arch/arm/mach-omap2/smartreflex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index fb7dc52..33a027f 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -622,7 +622,7 @@ void sr_disable(struct voltagedomain *voltdm) sr_v2_disable(sr); } - pm_runtime_put_sync(&sr->pdev->dev); + pm_runtime_put_sync_suspend(&sr->pdev->dev); } /** -- 1.7.4.1
WARNING: multiple messages have this Message-ID (diff)
From: nm@ti.com (Nishanth Menon) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] OMAP3+: PM: SR: use put_sync_suspend for disabling Date: Fri, 22 Jul 2011 00:55:52 -0500 [thread overview] Message-ID: <1311314153-23531-2-git-send-email-nm@ti.com> (raw) In-Reply-To: <1311314153-23531-1-git-send-email-nm@ti.com> From: Colin Cross <ccross@google.com> omap_sr_disable_reset_volt is called with irqs off in omapx_enter_sleep, as part of idle sequence, this eventually calls sr_disable and pm_runtime_put_sync. pm_runtime_put_sync calls rpm_idle, which will enable interrupts in order to call the callback. In this short interval when interrupts are enabled, scenarios such as the following can occur: while interrupts are enabled, the timer interrupt that is supposed to wake the device out of idle occurs and is acked, so when the CPU finally goes to off, the timer is already gone, missing a wakeup event. Further, as the documentation for runtime states:" However, subsystems can use the pm_runtime_irq_safe() helper function to tell the PM core that a device's ->runtime_suspend() and ->runtime_resume() callbacks should be invoked in atomic context with interrupts disabled (->runtime_idle() is still invoked the default way)." Hence, replace pm_runtime_put_sync with pm_runtime_put_sync_suspend to invoke the suspend handler and shut off the fclk for SmartReflex module instead of using the idle handler in interrupt disabled context. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Colin Cross <ccross@google.com> --- arch/arm/mach-omap2/smartreflex.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index fb7dc52..33a027f 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -622,7 +622,7 @@ void sr_disable(struct voltagedomain *voltdm) sr_v2_disable(sr); } - pm_runtime_put_sync(&sr->pdev->dev); + pm_runtime_put_sync_suspend(&sr->pdev->dev); } /** -- 1.7.4.1
next prev parent reply other threads:[~2011-07-22 5:56 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-07-22 5:55 [PATCH 0/2] OMAP3+: PM: SR fixes Nishanth Menon 2011-07-22 5:55 ` Nishanth Menon 2011-07-22 5:55 ` Nishanth Menon [this message] 2011-07-22 5:55 ` [PATCH 1/2] OMAP3+: PM: SR: use put_sync_suspend for disabling Nishanth Menon 2011-07-22 20:14 ` Kevin Hilman 2011-07-22 20:14 ` Kevin Hilman 2011-07-22 5:55 ` [PATCH 2/2] OMAP2+: PM: SR: add suspend/resume handlers Nishanth Menon 2011-07-22 5:55 ` Nishanth Menon 2011-07-22 9:13 ` Felipe Balbi 2011-07-22 9:13 ` Felipe Balbi 2011-07-22 13:53 ` Menon, Nishanth 2011-07-22 13:53 ` Menon, Nishanth 2011-07-22 20:10 ` Kevin Hilman 2011-07-22 20:10 ` Kevin Hilman
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=1311314153-23531-2-git-send-email-nm@ti.com \ --to=nm@ti.com \ --cc=ccross@google.com \ --cc=khilman@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.