diff mbox series

[1/6] powercap: intel_rapl_tpmi: Fix bogus register reading

Message ID 20240930081801.28502-2-rui.zhang@intel.com
State Accepted
Commit 91e8f835a7eda4ba2c0c4002a3108a0e3b22d34e
Headers show
Series [1/6] powercap: intel_rapl_tpmi: Fix bogus register reading | expand

Commit Message

Zhang Rui Sept. 30, 2024, 8:17 a.m. UTC
Fix bogus reading of the TPMI_RAPL_REG_DOMAIN_INFO register.

Cc: stable@vger.kernel.org
Fixes: 903eb9fb85e3 ("powercap: intel_rapl_tpmi: Fix System Domain probing")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/powercap/intel_rapl_tpmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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;