linux-uconsole/drivers/base
Ulf Hansson 1771adf9a9 UPSTREAM: PM / Domains: Fix potential deadlock while adding/removing subdomains
We must preserve the same order of how we acquire and release the lock for
genpd, as otherwise we may encounter deadlocks.

The power on phase of a genpd starts by acquiring its lock. Then it walks
the hierarchy of its parent domains to be able to power on these first, as
per design of genpd.

From a locking perspective this means the locks of the parents becomes
acquired after the lock of the subdomain.

Let's fix pm_genpd_add|remove_subdomain() to maintain the same order of
acquiring/releasing the genpd lock as being applied in the power on/off
sequence.

Change-Id: I7f56875b7620eee6247efecd502a3ada4bfa4e24
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from commit cdb300a041)
2016-07-01 19:38:51 +08:00
..
power UPSTREAM: PM / Domains: Fix potential deadlock while adding/removing subdomains 2016-07-01 19:38:51 +08:00
regmap regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case 2016-05-18 17:06:48 -07:00
attribute_container.c attribute_container: fix missing blank lines after declarations 2015-03-25 14:35:09 +01:00
base.h driver core: correct device's shutdown order 2015-08-05 17:07:19 -07:00
bus.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
cacheinfo.c cpu/cacheinfo: Fix teardown path 2015-09-17 06:06:54 -07:00
class.c class_find_device: fix reference to argument "match" 2015-09-29 15:23:14 +02:00
component.c component: fix bug with legacy API 2014-07-04 18:05:05 +01:00
container.c
core.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
cpu.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
dd.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
devcoredump.c devcoredump: provide a one-way disable function 2014-11-26 19:40:12 -08:00
devices_filter.h
devres.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
devtmpfs.c VFS: assorted weird filesystems: d_inode() annotations 2015-04-15 15:06:58 -04:00
dma-coherent.c drivers: dma-coherent: add initialization from device tree 2014-10-14 02:18:12 +02:00
dma-contiguous.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
dma-mapping.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
driver.c rk: temp revert rk change 2015-11-11 15:54:30 +08:00
firmware.c
firmware_class.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
hypervisor.c
init.c drivers: of/base: move of_init to driver_init 2015-05-26 19:55:56 -07:00
isa.c
Kconfig rk: revert to v3.10 2015-11-11 15:57:28 +08:00
Makefile rk: revert to v3.10 2015-11-11 15:57:28 +08:00
map.c drivers: base: map: Use kmalloc_array instead of kmalloc 2015-03-25 14:35:08 +01:00
memory.c drivers/base/memory.c: prohibit offlining of memory blocks with missing sections 2015-12-12 10:15:34 -08:00
module.c
node.c Revert "mm: Check if section present during memory block (un)registering" 2015-10-13 10:57:25 -07:00
pinctrl.c rk: temp revert rk change 2015-11-11 15:54:30 +08:00
platform-msi.c irqdomain/msi: Use fwnode instead of of_node 2015-10-13 19:01:25 +02:00
platform.c UPSTREAM: platform: Do not detach from PM domains on shutdown 2016-06-22 15:16:58 +08:00
property.c device property: ACPI: Remove unused DMA APIs 2015-11-07 01:29:22 +01:00
soc.c base: soc: siplify ida usage 2015-10-04 19:42:22 +01:00
syscore.c power: Adds functionality to log the last suspend abort reason. 2016-02-16 13:53:38 -08:00
topology.c rk: revert to v3.10 2015-11-11 15:57:28 +08:00
transport_class.c