UPSTREAM: 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: c79aa080fb0f ("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>
(cherry picked from commit 622d9b5577f19a6472db21df042fea8f5fefe244)

BUG=b:172363713
TEST=emerge-trogdor chromeos-kernel-5_4

Signed-off-by: Linux Patches Robot <linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com>
Change-Id: Idbfabdfc2315751a15e7f98cda709fc09d437245
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3665132
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
1 file changed