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

Commit 91e8f83

Browse files
zhang-ruirafaeljw
authored andcommitted
powercap: intel_rapl_tpmi: Fix bogus register reading
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]>
1 parent e1043b6 commit 91e8f83

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
@@ -181,7 +181,7 @@ static int parse_one_domain(struct tpmi_rapl_package *trp, u32 offset)
181181
pr_warn(FW_BUG "System domain must support Domain Info register\n");
182182
return -ENODEV;
183183
}
184-
tpmi_domain_info = readq(trp->base + offset + TPMI_RAPL_REG_DOMAIN_INFO);
184+
tpmi_domain_info = readq(trp->base + offset + TPMI_RAPL_REG_DOMAIN_INFO * 8);
185185
if (!(tpmi_domain_info & TPMI_RAPL_DOMAIN_ROOT))
186186
return 0;
187187
domain_type = RAPL_DOMAIN_PLATFORM;

0 commit comments

Comments
 (0)