linux_dsm_epyc7002/drivers/base/power
Rafael J. Wysocki cc85b20780 PM / Domains: Fix handling of wakeup devices during system resume
During system suspend pm_genpd_suspend_noirq() checks if the given
device is in a wakeup path (i.e. it appears to be needed for one or
more wakeup devices to work or is a wakeup device itself) and if it
needs to be "active" for wakeup to work.  If that is the case, the
function returns 0 without incrementing the device domain's counter
of suspended devices and without executing genpd_stop_dev() for the
device.  In consequence, the device is not stopped (e.g. its clock
isn't disabled) and power is always supplied to its domain in the
resulting system sleep state.

However, pm_genpd_resume_noirq() doesn't repeat that check and it
runs genpd_start_dev() and decrements the domain's counter of
suspended devices even for the wakeup device that weren't stopped by
pm_genpd_suspend_noirq().  As a result, the start callback may be run
unnecessarily for them and their domains' counters of suspended
devices may become negative.  Both outcomes aren't desirable, so fix
pm_genpd_resume_noirq() to look for wakeup devices that might not be
stopped by during system suspend.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Simon Horman <horms@verge.net.au>
Cc: stable@vger.kernel.org
2012-03-16 21:44:41 +01:00
..
clock_ops.c PM / Clocks: Only disable enabled clocks in pm_clk_suspend() 2011-11-10 00:44:10 +01:00
common.c drivers/base: change module.h -> export.h in power/common.c 2011-10-31 19:31:39 -04:00
domain_governor.c PM / Domains: Skip governor functions for CONFIG_PM_RUNTIME unset 2012-01-14 00:39:36 +01:00
domain.c PM / Domains: Fix handling of wakeup devices during system resume 2012-03-16 21:44:41 +01:00
generic_ops.c PM / Sleep: Introduce generic callbacks for new device PM phases 2012-01-29 20:38:41 +01:00
main.c PM / Sleep: Introduce "late suspend" and "early resume" of devices 2012-01-29 20:38:29 +01:00
Makefile PM / Domains: Add device stop governor function (v4) 2011-12-01 21:47:40 +01:00
opp.c PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) 2011-11-08 22:34:00 +01:00
power.h PM / QoS: Add function dev_pm_qos_read_value() (v3) 2011-10-04 21:54:26 +02:00
qos.c Merge branch 'pm-domains' into pm-for-linus 2011-12-25 23:43:11 +01:00
runtime.c Merge branch 'pm-runtime' into pm-for-linus 2011-12-25 23:43:05 +01:00
sysfs.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
trace.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
wakeup.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00