OSDN Git Service

PM / Domains: Fix asynchronous execution of *noirq() callbacks
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 8 Feb 2017 12:39:00 +0000 (13:39 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 9 Feb 2017 00:01:26 +0000 (01:01 +0100)
commit0883ac038be12c4dba1a68a05030730f10442bc2
tree4c1a38301b35bc50454aaff6f8c61d1174b94fde
parentf3c826ac26766f82769319db68f5b4337d6efc24
PM / Domains: Fix asynchronous execution of *noirq() callbacks

As the PM core may invoke the *noirq() callbacks asynchronously, the
current lock-less approach in genpd doesn't work. The consequence is that
we may find concurrent operations racing to power on/off the PM domain.

As of now, no immediate errors has been reported, but it's probably only a
matter time. Therefor let's fix the problem now before this becomes a real
issue, by deploying the locking scheme to the relevant functions.

Reported-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c