Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit bd3222d

Browse files
zhang-ruigregkh
authored andcommitted
powercap: intel_rapl_tpmi: Fix bogus register reading
commit 91e8f83 upstream. The TPMI_RAPL_REG_DOMAIN_INFO value needs to be multiplied by 8 to get the register offset. Cc: All applicable <[email protected]> Fixes: 903eb9f ("powercap: intel_rapl_tpmi: Fix System Domain probing") Signed-off-by: Zhang Rui <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 697e3dd commit bd3222d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/powercap/intel_rapl_tpmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static int parse_one_domain(struct tpmi_rapl_package *trp, u32 offset)
192192
pr_warn(FW_BUG "System domain must support Domain Info register\n");
193193
return -ENODEV;
194194
}
195-
tpmi_domain_info = readq(trp->base + offset + TPMI_RAPL_REG_DOMAIN_INFO);
195+
tpmi_domain_info = readq(trp->base + offset + TPMI_RAPL_REG_DOMAIN_INFO * 8);
196196
if (!(tpmi_domain_info & TPMI_RAPL_DOMAIN_ROOT))
197197
return 0;
198198
domain_type = RAPL_DOMAIN_PLATFORM;

0 commit comments

Comments
 (0)