cpuidle: psci: Fixup execution order when entering a domain idle state
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 11 May 2020 13:33:46 +0000 (15:33 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 May 2020 16:37:36 +0000 (18:37 +0200)
commit8b7ce5e49049ca78c238f03d70569a73da049f32
tree0e6569b37834fdca4014b209801634f4fdcd34ba
parenteba933ceebf212127c9aa1c87a162867af9cf781
cpuidle: psci: Fixup execution order when entering a domain idle state

Moving forward, platforms are going to need to execute specific "last-man"
operations before a domain idle state can be entered. In one way or the
other, these operations needs to be triggered while walking the
hierarchical topology via runtime PM and genpd, as it's at that point the
last-man becomes known.

Moreover, executing last-man operations needs to be done after the CPU PM
notifications are sent through cpu_pm_enter(), as otherwise it's likely
that some notifications would fail. Therefore, let's re-order the sequence
in psci_enter_domain_idle_state(), so cpu_pm_enter() gets called prior
pm_runtime_put_sync().

Fixes: ce85aef570df ("cpuidle: psci: Manage runtime PM in the idle path")
Reported-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-psci.c