Skip to content

Commit 7a57e9f

Browse files
zhang-ruirafaeljw
authored andcommitted
powercap/intel_rapl: Fix domain detection
As only the low 32 bits of the RAPL_DOMAIN_REG_STATUS register represents the energy counter, and the high 32 bits are reserved, detect the existence of a RAPL domain by checking the low 32 bits only. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 0b8417c commit 7a57e9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/powercap/intel_rapl_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ static int rapl_check_domain(int cpu, int domain, struct rapl_package *rp)
12281228
* values, otherwise skip it.
12291229
*/
12301230

1231-
ra.mask = ~0;
1231+
ra.mask = ENERGY_STATUS_MASK;
12321232
if (rp->priv->read_raw(cpu, &ra) || !ra.value)
12331233
return -ENODEV;
12341234

0 commit comments

Comments
 (0)