Skip to content

Commit 129b60c

Browse files
jhovoldrafaeljw
authored andcommitted
PM: domains: log failures to register always-on domains
Always-on PM domains must be on during initialisation or the domain is currently silently rejected. Print an error message in case an always-on domain is not on to make it easier to debug drivers getting this wrong (e.g. by setting an always-on genpd flag without making sure that the state matches). Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent c79e6fa commit 129b60c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/base/power/domain.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,8 +2085,10 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
20852085

20862086
/* Always-on domains must be powered on at initialization. */
20872087
if ((genpd_is_always_on(genpd) || genpd_is_rpm_always_on(genpd)) &&
2088-
!genpd_status_on(genpd))
2088+
!genpd_status_on(genpd)) {
2089+
pr_err("always-on PM domain %s is not on\n", genpd->name);
20892090
return -EINVAL;
2091+
}
20902092

20912093
/* Multiple states but no governor doesn't make sense. */
20922094
if (!gov && genpd->state_count > 1)

0 commit comments

Comments
 (0)