linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-pm@vger.kernel.org
Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Kevin Hilman <khilman@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Lina Iyer <lina.iyer@linaro.org>,
	Jon Hunter <jonathanh@nvidia.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH 4/4] PM / Domains: Don't warn about IRQ safe device for an always on PM domain
Date: Mon, 20 Mar 2017 11:19:23 +0100	[thread overview]
Message-ID: <1490005163-28633-5-git-send-email-ulf.hansson@linaro.org> (raw)
In-Reply-To: <1490005163-28633-1-git-send-email-ulf.hansson@linaro.org>

When an IRQ safe device is attached to a no sleep domain, genpd prints a
warning once, as to indicate it is a suboptimal configuration from power
consumption point of view.

However the warning doesn't make sense for an always on domain, since it
anyway remains powered on. Therefore, let's change to not print the warning
for this configuration.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/base/power/domain.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 8a2bfc8..bfba02f 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -132,8 +132,12 @@ static inline bool irq_safe_dev_in_no_sleep_domain(struct device *dev,
 
 	ret = pm_runtime_is_irq_safe(dev) && !genpd_is_irq_safe(genpd);
 
-	/* Warn once if IRQ safe dev in no sleep domain */
-	if (ret)
+	/*
+	 * Warn once if an IRQ safe device is attached to a no sleep domain, as
+	 * to indicate a suboptimal configuration for PM. For an always on
+	 * domain this isn't case, thus don't warn.
+	 */
+	if (ret && !genpd_is_always_on(genpd))
 		dev_warn_once(dev, "PM domain %s will not be powered off\n",
 				genpd->name);
 
-- 
2.7.4

  parent reply	other threads:[~2017-03-20 10:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 10:19 [PATCH 0/4] PM / Domains: Add support for always on PM domains in genpd Ulf Hansson
2017-03-20 10:19 ` [PATCH 1/4] PM / Domains: Clean up code validating genpd's status Ulf Hansson
2017-03-20 11:07   ` Viresh Kumar
2017-03-20 11:49   ` Geert Uytterhoeven
     [not found]   ` <CGME20170320171040epcas1p3ed2179e98b8dbeead3cb81571dd8fbf3@epcas1p3.samsung.com>
2017-03-20 17:10     ` Bartlomiej Zolnierkiewicz
2017-03-20 10:19 ` [PATCH 2/4] PM / Domains: Enable users of genpd to specify always on PM domains Ulf Hansson
2017-03-20 11:11   ` Viresh Kumar
2017-03-20 11:54   ` Geert Uytterhoeven
     [not found]   ` <CGME20170320171057epcas1p2b7c3a9d663e86df6e29e7e6ceb582a70@epcas1p2.samsung.com>
2017-03-20 17:10     ` Bartlomiej Zolnierkiewicz
2017-03-20 10:19 ` [PATCH 3/4] PM / Domains: Respect errors from genpd's ->power_off() callback Ulf Hansson
2017-03-20 11:11   ` Viresh Kumar
2017-03-20 11:58   ` Geert Uytterhoeven
     [not found]   ` <CGME20170320171402epcas5p4f3e78dbbc7056aceda93501ae8af4a8c@epcas5p4.samsung.com>
2017-03-20 17:14     ` Bartlomiej Zolnierkiewicz
2017-03-20 10:19 ` Ulf Hansson [this message]
2017-03-20 11:12   ` [PATCH 4/4] PM / Domains: Don't warn about IRQ safe device for an always on PM domain Viresh Kumar
2017-03-20 11:59   ` Geert Uytterhoeven
     [not found]   ` <CGME20170320171420epcas1p2f4598561c0bb9b81f8182a2566a4d93d@epcas1p2.samsung.com>
2017-03-20 17:14     ` Bartlomiej Zolnierkiewicz
2017-04-23 22:12 ` [PATCH 0/4] PM / Domains: Add support for always on PM domains in genpd 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=1490005163-28633-5-git-send-email-ulf.hansson@linaro.org \
    --to=ulf.hansson@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=jonathanh@nvidia.com \
    --cc=khilman@kernel.org \
    --cc=len.brown@intel.com \
    --cc=lina.iyer@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@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;
as well as URLs for NNTP newsgroup(s).