summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2024-09-30 11:17:56 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-10-07 21:10:56 +0300
commit91e8f835a7eda4ba2c0c4002a3108a0e3b22d34e (patch)
treed0f9cb237b2bd273ed5e6cf2ec5ce558f4ab6b4e
parente1043b6765d6ca310a10be342e25d5451d58ee53 (diff)
downloadlinux-91e8f835a7eda4ba2c0c4002a3108a0e3b22d34e.tar.xz
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: 903eb9fb85e3 ("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>
-rw-r--r--drivers/powercap/intel_rapl_tpmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/powercap/intel_rapl_tpmi.c b/drivers/powercap/intel_rapl_tpmi.c
index 947544e4d229..7435df083ea4 100644
--- a/drivers/powercap/intel_rapl_tpmi.c
+++ b/drivers/powercap/intel_rapl_tpmi.c
@@ -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;