]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Domains: Prepare for adding support to remove PM domains
authorJon Hunter <jonathanh@nvidia.com>
Mon, 12 Sep 2016 11:01:11 +0000 (12:01 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 13 Sep 2016 00:49:34 +0000 (02:49 +0200)
commit1079d7886359ae049658c845bda5883ba4b95bd5
treeadf901b588e83fe71c9887b4498e46bd6f29acd3
parent456834d9fe1370f19f78534747400ea4af4e6324
PM / Domains: Prepare for adding support to remove PM domains

In order to remove PM domains safely from the list of PM domains,
it is necessary to adding locking for the PM domain list around any
places where devices or subdomains are added to a PM domain.

There are places where a reference to a PM domain is obtained via
calling of_genpd_get_from_provider() before adding the device or the
subdomain. In these cases a lock for the PM domain list needs to be
held around the call to of_genpd_get_from_provider() and the call to
add the device/subdomain. To avoid deadlocks by multiple attempts to
obtain the PM domain list lock, add functions genpd_add_device() and
genpd_add_subdomain() which require the user to hold the PM domain
list lock when calling.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c