mbox series

[0/2] PM: runtime/cpuidle: Improve suspend-to-ram support for cpuidle-psci

Message ID 20220401141124.27272-1-ulf.hansson@linaro.org
Headers show
Series PM: runtime/cpuidle: Improve suspend-to-ram support for cpuidle-psci | expand

Message

Ulf Hansson April 1, 2022, 2:11 p.m. UTC
Maulik Shah reported a problem with suspend-to-ram for one of the Qualcomm
platforms that is using PSCI OSI mode. Briefly described, the genpd on/off
notifiers doesn't get sent when the boot CPU is turned on/off, which prevents
the needed platform specific operations to be executed.

This series intends to solve these problems.

Note that, I have tested this on Dragonboard 410c, with some local hacks to the
PSCI firmware driver. This was needed because the PSCI firmware didn't support
SYSTEM_SUSPEND, so I basically made psci_system_suspend_enter() to call
cpu_do_idle() and forced a suspend ops to be registered.

Maulik, can you please test this at your setup?

Kind regards
Ulf Hansson


Ulf Hansson (2):
  PM: runtime: Allow to call __pm_runtime_set_status() from atomic
    context
  cpuidle: psci: Improve support for suspend-to-ram for PSCI OSI mode

 drivers/base/power/runtime.c   |  9 ++++---
 drivers/cpuidle/cpuidle-psci.c | 46 ++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 4 deletions(-)

Comments

Rafael J. Wysocki April 13, 2022, 3:16 p.m. UTC | #1
On Fri, Apr 1, 2022 at 4:11 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> Maulik Shah reported a problem with suspend-to-ram for one of the Qualcomm
> platforms that is using PSCI OSI mode. Briefly described, the genpd on/off
> notifiers doesn't get sent when the boot CPU is turned on/off, which prevents
> the needed platform specific operations to be executed.
>
> This series intends to solve these problems.
>
> Note that, I have tested this on Dragonboard 410c, with some local hacks to the
> PSCI firmware driver. This was needed because the PSCI firmware didn't support
> SYSTEM_SUSPEND, so I basically made psci_system_suspend_enter() to call
> cpu_do_idle() and forced a suspend ops to be registered.
>
> Maulik, can you please test this at your setup?
>
> Kind regards
> Ulf Hansson
>
>
> Ulf Hansson (2):
>   PM: runtime: Allow to call __pm_runtime_set_status() from atomic
>     context
>   cpuidle: psci: Improve support for suspend-to-ram for PSCI OSI mode
>
>  drivers/base/power/runtime.c   |  9 ++++---
>  drivers/cpuidle/cpuidle-psci.c | 46 ++++++++++++++++++++++++++++++++++
>  2 files changed, 51 insertions(+), 4 deletions(-)

Both patches applied as 5.19 material (in the PM-sleep category,
because they really are system-wide suspend support material).

Thanks!