Commit 7b874772 authored by Jacob Pan's avatar Jacob Pan Committed by Rafael J. Wysocki

powercap / intel_rapl: relax sanity check on energy counters

Some RAPL domains may not be active at the time driver is being
loaded. Checking energy counter increment may be too strict and
time consuming. So relax the sanity check on energy counters of
these domains.

Otherwise, they may be ignored and become unavailable to the
powercap framework.
Signed-off-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b28a960c
......@@ -1147,6 +1147,11 @@ static int rapl_check_domain(int cpu, int domain)
if (rdmsrl_safe_on_cpu(cpu, msr, &val1))
return -ENODEV;
/* PP1/uncore/graphics domain may not be active at the time of
* driver loading. So skip further checks.
*/
if (domain == RAPL_DOMAIN_PP1)
return 0;
/* energy counters roll slowly on some domains */
while (++retry < 10) {
usleep_range(10000, 15000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment