From: Zhang Rui <rui.zhang@intel.com>
To: rafael.j.wysocki@intel.com
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
srinivas.pandruvada@intel.com
Subject: [PATCH 1/6] powercap: intel_rapl_tpmi: Fix bogus register reading
Date: Mon, 30 Sep 2024 16:17:56 +0800 [thread overview]
Message-ID: <20240930081801.28502-2-rui.zhang@intel.com> (raw)
In-Reply-To: <20240930081801.28502-1-rui.zhang@intel.com>
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 --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;
--
2.34.1
next prev parent reply other threads:[~2024-09-30 8:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 8:17 [PATCH 0/6] thermal/rapl: fixes, improvements and cleanups Zhang Rui
2024-09-30 8:17 ` Zhang Rui [this message]
2024-09-30 8:17 ` [PATCH 2/6] thermal: proc_thermal: Fix WARNING during module unload Zhang Rui
2024-09-30 8:17 ` [PATCH 3/6] powercap: intel_rapl_tpmi: Ignore minor version change Zhang Rui
2024-09-30 8:17 ` [PATCH 4/6] powercap: intel_rapl_msr: Add PL4 support for Arrowlake-U Zhang Rui
2024-09-30 8:18 ` [PATCH 5/6] thermal: proc_thermal: Remove MMIO RAPL cpu hotplug support Zhang Rui
2024-09-30 8:18 ` [PATCH 6/6] thermal: proc_thermal: Add MMIO RAPL PL4 support Zhang Rui
2024-10-07 18:13 ` [PATCH 0/6] thermal/rapl: fixes, improvements and cleanups Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240930081801.28502-2-rui.zhang@intel.com \
--to=rui.zhang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=srinivas.pandruvada@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®