]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cpufreq: powernv: Register for OCC related opal_message notification
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Thu, 16 Jul 2015 08:04:20 +0000 (13:34 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Jul 2015 15:24:13 +0000 (17:24 +0200)
commitcb166fa937a2fbc14badcafca86202354c34a213
tree3c82a0040cfb9b70f9bceb65ba51308d8f1fb6e8
parent196ba2d514a13f6af1b3d78de71ce74ed2fc8bdc
cpufreq: powernv: Register for OCC related opal_message notification

OCC is an On-Chip-Controller which takes care of power and thermal
safety of the chip. During runtime due to power failure or
overtemperature the OCC may throttle the frequencies of the CPUs to
remain within the power budget.

We want the cpufreq driver to be aware of such situations to be able
to report the reason to the user. We register to opal_message_notifier
to receive OCC messages from opal.

powernv_cpufreq_throttle_check() reports any frequency throttling and
this patch will report the reason or event that caused throttling. We
can be throttled if OCC is reset or OCC limits Pmax due to power or
thermal reasons. We are also notified of unthrottling after an OCC
reset or if OCC restores Pmax on the chip.

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