Skip to content

Commit 622d9b5

Browse files
Ulf Hanssonrafaeljw
authored andcommitted
PM: domains: Fix initialization of genpd's next_wakeup
In the genpd governor we walk the list of child-domains to take into account their next_wakeup. If the child-domain itself, doesn't have a governor assigned to it, we can end up using the next_wakeup value before it has been properly initialized. To prevent a possible incorrect behaviour in the governor, let's initialize next_wakeup to KTIME_MAX. Fixes: c79aa08 ("PM: domains: use device's next wakeup to determine domain idle state") Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent a294237 commit 622d9b5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/base/power/domain.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
20072007
genpd->device_count = 0;
20082008
genpd->max_off_time_ns = -1;
20092009
genpd->max_off_time_changed = true;
2010+
genpd->next_wakeup = KTIME_MAX;
20102011
genpd->provider = NULL;
20112012
genpd->has_provider = false;
20122013
genpd->accounting_time = ktime_get_mono_fast_ns();

0 commit comments

Comments
 (0)