]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Domains: Allocate memory outside domain locks
authorLina Iyer <lina.iyer@linaro.org>
Wed, 28 Oct 2015 21:19:50 +0000 (15:19 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 2 Nov 2015 01:26:17 +0000 (02:26 +0100)
commitcebaf1031c00e9de59341f0485ee6c41b0fcfb33
tree237a3455cf5bd251b0d5c9ea8ecddc93a7edecab
parente17577a088ea1f9f5fa00f4b102587c60c8326df
PM / Domains: Allocate memory outside domain locks

In preparation for supporting IRQ-safe domains, allocate domain data
outside the domain locks. These functions are not called in an atomic
context, so we can always allocate memory using GFP_KERNEL. By
allocating memory before the locks, we can safely lock the domain using
spinlocks instead of mutexes.

Reviewed-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c