cpufreq: powernv: Call throttle_check() on receiving OCC_THROTTLE
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Thu, 16 Jul 2015 08:04:21 +0000 (13:34 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Jul 2015 15:24:13 +0000 (17:24 +0200)
commit735366fc407755626058218fc8d0430735a669ac
tree53b7a3d7c212dfd21a68eab03e189e60d06e46a6
parentcb166fa937a2fbc14badcafca86202354c34a213
cpufreq: powernv: Call throttle_check() on receiving OCC_THROTTLE

Re-evaluate the chip's throttled state on recieving OCC_THROTTLE
notification by executing *throttle_check() on any one of the cpu on
the chip. This is a sanity check to verify if we were indeed
throttled/unthrottled after receiving OCC_THROTTLE notification.

We cannot call *throttle_check() directly from the notification
handler because we could be handling chip1's notification in chip2. So
initiate an smp_call to execute *throttle_check(). We are irq-disabled
in the notification handler, so use a worker thread to smp_call
throttle_check() on any of the cpu in the chipmask.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/powernv-cpufreq.c