Skip to content

Commit 7b87477

Browse files
Jacob Panrafaeljw
authored andcommitted
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: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent b28a960 commit 7b87477

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/powercap/intel_rapl.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,11 @@ static int rapl_check_domain(int cpu, int domain)
11471147
if (rdmsrl_safe_on_cpu(cpu, msr, &val1))
11481148
return -ENODEV;
11491149

1150+
/* PP1/uncore/graphics domain may not be active at the time of
1151+
* driver loading. So skip further checks.
1152+
*/
1153+
if (domain == RAPL_DOMAIN_PP1)
1154+
return 0;
11501155
/* energy counters roll slowly on some domains */
11511156
while (++retry < 10) {
11521157
usleep_range(10000, 15000);

0 commit comments

Comments
 (0)