Skip to content

Commit 075c37d

Browse files
storulfrafaeljw
authored andcommitted
PM / Domains: Don't warn about IRQ safe device for an always on PM domain
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 <[email protected]> Reviewed-by: Viresh Kumar <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 1c14967 commit 075c37d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/base/power/domain.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,12 @@ static inline bool irq_safe_dev_in_no_sleep_domain(struct device *dev,
132132

133133
ret = pm_runtime_is_irq_safe(dev) && !genpd_is_irq_safe(genpd);
134134

135-
/* Warn once if IRQ safe dev in no sleep domain */
136-
if (ret)
135+
/*
136+
* Warn once if an IRQ safe device is attached to a no sleep domain, as
137+
* to indicate a suboptimal configuration for PM. For an always on
138+
* domain this isn't case, thus don't warn.
139+
*/
140+
if (ret && !genpd_is_always_on(genpd))
137141
dev_warn_once(dev, "PM domain %s will not be powered off\n",
138142
genpd->name);
139143

0 commit comments

Comments
 (0)