Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Tony Lindgren <tony@atomide.com>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Brian Norris <briannorris@chromium.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Len Brown <len.brown@intel.com>, Nishanth Menon <nm@ti.com>,
	Pavel Machek <pavel@ucw.cz>, Ulf Hansson <ulf.hansson@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, Tero Kristo <t-kristo@ti.com>
Subject: Re: [PATCH] PM / wakeirq: report a wakeup_event on dedicated wekup irq
Date: Thu, 16 Feb 2017 00:45:56 +0100	[thread overview]
Message-ID: <2289787.GWFQX3VCmA@aspire.rjw.lan> (raw)
In-Reply-To: <20170213204322.27588-1-tony@atomide.com>

On Monday, February 13, 2017 12:43:22 PM Tony Lindgren wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.com>
> 
> 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")
> Cc: Brian Norris <briannorris@chromium.org>
> Cc: Tero Kristo <t-kristo@ti.com>
> 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>

Applied (along with the other two wakeirq fixes).

Thanks,
Rafael

      reply	other threads:[~2017-02-15 23:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 20:43 [PATCH] PM / wakeirq: report a wakeup_event on dedicated wekup irq Tony Lindgren
2017-02-15 23:45 ` Rafael J. Wysocki [this message]

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=2289787.GWFQX3VCmA@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=briannorris@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=grygorii.strashko@ti.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pavel@ucw.cz \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.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: 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