]> git.baikalelectronics.ru Git - kernel.git/commit
PM: domains: Fix initialization of genpd's next_wakeup
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 11 May 2022 14:57:00 +0000 (16:57 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 19 May 2022 18:16:05 +0000 (20:16 +0200)
commit113317254ebc4763a7c7627c91e570637c06df87
treed1c6d5abbe876b28c5d7ce7c6b92796afb9a3bf4
parent6c9548b93aa40215c18a2790646a86b1fd17d9d1
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: b67f943601e6 ("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>
drivers/base/power/domain.c