public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] turbostat-v2026.02.14+AMD
@ 2026-02-18  3:02 Len Brown
  2026-02-18  3:02 ` [PATCH 1/1] tools/power turbostat: Fix AMD RAPL regression Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Len Brown @ 2026-02-18  3:02 UTC (permalink / raw)
  To: torvalds; +Cc: linux-pm, linux-kernel

Hi Linus,

Please pull this turbostat-v2026.02.14+AMD patch.

thanks!
Len Brown, Intel Open Source Technology Center

The following changes since commit 51496091dd37b405e6e399a9638da3f1da3f4c64:

  tools/power turbostat: version 2026.02.14 (2026-02-13 14:08:33 -0600)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git tags/turbostat-v2026.02.14+AMD

for you to fetch changes up to cfd5ff044914fd5f7fae2403675b68593f986055:

  tools/power turbostat: Fix AMD RAPL regression (2026-02-17 20:47:16 -0600)

----------------------------------------------------------------
turbostat-v2026.02.14+AMD

Fix regression on AMD in 2026.02.14

----------------------------------------------------------------
Len Brown (1):
      tools/power turbostat: Fix AMD RAPL regression

 tools/power/x86/turbostat/turbostat.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] tools/power turbostat: Fix AMD RAPL regression
  2026-02-18  3:02 [GIT PULL] turbostat-v2026.02.14+AMD Len Brown
@ 2026-02-18  3:02 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2026-02-18  3:02 UTC (permalink / raw)
  To: torvalds; +Cc: linux-pm, linux-kernel, Len Brown

From: Len Brown <len.brown@intel.com>

turbostat.c:8688: rapl_perf_init: Assertion `next_domain < num_domains' failed.

Revert a hunk from a cleanup patch that was not supposed to change anything...
And once again, AMD RAPL is "special".

Fixes: ddf60e38ca04 ("tools/power turbostat: Simplify global core_id calculation")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 tools/power/x86/turbostat/turbostat.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 1aace9b3269e..606f3dead084 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -5161,10 +5161,17 @@ static inline int get_rapl_num_domains(void)
 
 static inline int get_rapl_domain_id(int cpu)
 {
+	int nr_cores_per_package = topo.max_core_id + 1;
+	int rapl_core_id;
+
 	if (!platform->has_per_core_rapl)
 		return cpus[cpu].package_id;
 
-	return GLOBAL_CORE_ID(cpu, cpus[cpu].package_id);
+	/* Compute the system-wide unique core-id for @cpu */
+	rapl_core_id = cpus[cpu].core_id;
+	rapl_core_id += cpus[cpu].package_id * nr_cores_per_package;
+
+	return rapl_core_id;
 }
 
 /*
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-18  3:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18  3:02 [GIT PULL] turbostat-v2026.02.14+AMD Len Brown
2026-02-18  3:02 ` [PATCH 1/1] tools/power turbostat: Fix AMD RAPL regression Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox