linux-stable/drivers/cpuidle
Ulf Hansson a3badba7e1 cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode
[ Upstream commit 171b66e2e2 ]

When PSCI OSI mode is supported the syscore flag is set for the CPU devices
that becomes attached to their PM domains (genpds). In the suspend-to-idle
case, we call dev_pm_genpd_suspend|resume() to allow genpd to properly
manage the power-off/on operations (pick an idlestate and manage the on/off
notifications).

For suspend-to-ram, dev_pm_genpd_suspend|resume() is currently not being
called, which causes a problem that the genpd on/off notifiers do not get
sent as expected. This prevents the platform-specific operations from being
executed, typically needed just before/after the boot CPU is being turned
off/on.

To deal with this problem, let's register a syscore ops for cpuidle-psci
when PSCI OSI mode is being used and call dev_pm_genpd_suspend|resume()
from them. In this way, genpd regains control of the PM domain topology and
then sends the on/off notifications when it's appropriate.

Reported-by: Maulik Shah <quic_mkshah@quicinc.com>
Suggested-by: Maulik Shah <quic_mkshah@quicinc.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Maulik Shah <quic_mkshah@quicinc.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:21 +02:00
..
governors cpuidle: menu: Fix typo in a comment 2021-11-24 17:30:44 +01:00
Kconfig cpuidle: Fix Kconfig indentation 2019-11-29 11:47:35 +01:00
Kconfig.arm Qualcomm driver updates for v5.16 2021-10-13 22:34:43 +02:00
Kconfig.mips treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.powerpc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile cpuidle: psci: Split into two separate build objects 2020-07-29 18:38:30 +02:00
coupled.c smp: Cleanup smp_call_function*() 2020-11-24 16:47:49 +01:00
cpuidle-arm.c thermal: cpuidle: Register cpuidle cooling device 2020-05-19 12:58:07 +02:00
cpuidle-at91.c
cpuidle-big_little.c cpuidle: big.LITTLE: enable driver only on Peach-Pit/Pi Chromebooks 2020-10-26 10:15:24 +01:00
cpuidle-calxeda.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
cpuidle-clps711x.c cpuidle: clps711x: convert to devm_platform_ioremap_resource() 2019-12-20 10:04:27 +01:00
cpuidle-cps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cpuidle-exynos.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpuidle-haltpoll.c cpuidle-haltpoll: Fix small typo 2020-04-08 14:35:45 +02:00
cpuidle-kirkwood.c cpuidle: kirkwood: convert to devm_platform_ioremap_resource() 2019-12-20 10:05:44 +01:00
cpuidle-mvebu-v7.c
cpuidle-powernv.c powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10 2020-09-15 22:13:38 +10:00
cpuidle-psci-domain.c cpuidle: psci: Enable suspend-to-idle for PSCI OSI mode 2020-11-10 20:42:01 +01:00
cpuidle-psci.c cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode 2022-06-09 10:25:21 +02:00
cpuidle-psci.h cpuidle: psci: Fix error path via converting to a platform driver 2020-07-29 18:38:30 +02:00
cpuidle-pseries.c cpuidle: pseries: Mark pseries_idle_proble() as __init 2021-08-04 10:53:38 +10:00
cpuidle-qcom-spm.c cpuidle: qcom-spm: Check if any CPU is managed by SPM 2022-04-08 13:57:46 +02:00
cpuidle-tegra.c cpuidle: tegra: Check whether PMC is ready 2021-10-05 19:11:40 +02:00
cpuidle-ux500.c mfd/cpuidle: ux500: Rename driver symbol 2021-08-16 13:42:34 +01:00
cpuidle-zynq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
cpuidle.c cpuidle: Select polling interval based on a c-state with a longer target residency 2020-12-01 17:59:18 +01:00
cpuidle.h cpuidle: allow governor switch on cpuidle_register_driver() 2019-09-11 17:36:30 +02:00
driver.c cpuidle: Use s64 as exit_latency_ns and target_residency_ns data type 2021-04-07 19:26:44 +02:00
dt_idle_states.c cpuidle: dt: Support hierarchical CPU idle states 2020-01-02 16:50:08 +01:00
dt_idle_states.h
governor.c cpuidle: Call cpu_latency_qos_limit() instead of pm_qos_request() 2020-02-13 11:26:57 +01:00
poll_state.c cpuidle: Drop disabled field from struct cpuidle_state 2019-11-29 11:48:39 +01:00
sysfs.c cpuidle: use default_groups in kobj_type 2022-01-05 18:31:17 +01:00