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 <stable@vger.kernel.org>
Fixes: 903eb9fb85
("powercap: intel_rapl_tpmi: Fix System Domain probing")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Link: https://patch.msgid.link/20240930081801.28502-2-rui.zhang@intel.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
e1043b6765
commit
91e8f835a7
@ -181,7 +181,7 @@ static int parse_one_domain(struct tpmi_rapl_package *trp, u32 offset)
|
||||
pr_warn(FW_BUG "System domain must support Domain Info register\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
tpmi_domain_info = readq(trp->base + offset + TPMI_RAPL_REG_DOMAIN_INFO);
|
||||
tpmi_domain_info = readq(trp->base + offset + TPMI_RAPL_REG_DOMAIN_INFO * 8);
|
||||
if (!(tpmi_domain_info & TPMI_RAPL_DOMAIN_ROOT))
|
||||
return 0;
|
||||
domain_type = RAPL_DOMAIN_PLATFORM;
|
||||
|
Loading…
Reference in New Issue
Block a user