1
0
Fork 0
alistair23-linux/drivers/base/power
Lina Iyer d716f4798f PM / Domains: Support IRQ safe PM domains
Generic Power Domains currently support turning on/off only in process
context. This prevents the usage of PM domains for domains that could be
powered on/off in a context where IRQs are disabled. Many such domains
exist today and do not get powered off, when the IRQ safe devices in
that domain are powered off, because of this limitation.

However, not all domains can operate in IRQ safe contexts. Genpd
therefore, has to support both cases where the domain may or may not
operate in IRQ safe contexts. Configuring genpd to use an appropriate
lock for that domain, would allow domains that have IRQ safe devices to
runtime suspend and resume, in atomic context.

To achieve domain specific locking, set the domain's ->flag to
GENPD_FLAG_IRQ_SAFE while defining the domain. This indicates that genpd
should use a spinlock instead of a mutex for locking the domain. Locking
is abstracted through genpd_lock() and genpd_unlock() functions that use
the flag to determine the appropriate lock to be used for that domain.

Domains that have lower latency to suspend and resume and can operate
with IRQs disabled may now be able to save power, when the component
devices and sub-domains are idle at runtime.

The restriction this imposes on the domain hierarchy is that non-IRQ
safe domains may not have IRQ-safe subdomains, but IRQ safe domains may
have IRQ safe and non-IRQ safe subdomains and devices.

Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-10-21 22:20:56 +02:00
..
opp PM / OPP: Don't support OPP if it provides supported-hw but platform does not 2016-09-26 15:13:31 +02:00
Makefile PM / OPP: Move opp core to its own directory 2015-09-15 02:03:16 +02:00
clock_ops.c PM / clk: Add support for adding a specific clock from device-tree 2016-06-28 00:42:10 +02:00
common.c PM: Avoid false-positive warnings in dev_pm_domain_set() 2016-02-03 19:10:37 +01:00
domain.c PM / Domains: Support IRQ safe PM domains 2016-10-21 22:20:56 +02:00
domain_governor.c PM / Domains: Rename stop_ok to suspend_ok for the genpd governor 2016-04-22 02:29:17 +02:00
generic_ops.c PM / PCI / ACPI: Kick devices that might have been reset by firmware 2015-10-14 02:17:34 +02:00
main.c PM / sleep: Handle failures in device_suspend_late() consistently 2016-05-20 23:09:49 +02:00
power.h PM / sleep: Go direct_complete if driver has no callbacks 2016-01-08 01:12:06 +01:00
qos.c PM / QoS: Make it possible to expose device latency tolerance to userspace 2015-07-28 08:50:41 +01:00
runtime.c PM / runtime: Use _rcuidle for runtime suspend tracepoints 2016-09-16 02:59:58 +02:00
sysfs.c PM / QoS: Make it possible to expose device latency tolerance to userspace 2015-07-28 08:50:41 +01:00
trace.c char/genrtc: x86: remove remnants of asm/rtc.h 2016-06-04 00:20:07 +02:00
wakeirq.c PM / wakeirq: check that wake IRQ is valid before accepting it 2015-11-16 23:10:20 +01:00
wakeup.c PM-wakeup: Delete unnecessary checks before three function calls 2016-07-28 23:51:04 +02:00