Skip to contentSkip to conversation

turbostat-v2026.02.14+AMD

GIT PULL New Len Brown 2 participants 3 messages Feb 18 Turbostat utility

lore
Share & tools
lore

Len Brown

author maintainer
#0 lore raw

Hi Linus,

Please pull this AMD turbostat regression fix.

(ignore v1 -- bisect fooled me into thinking there was 1 hunk to revert, but it turned out there were two issues...)

Thanks for running turbostat on your AMD box.
I'll be sure to sanity check on AMD next time.

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-2026.02.14-AMD-RAPL-fix

for you to fetch changes up to ef0e60083f768b32cda17b1b0ca9519405db89a6:

tools/power turbostat: Fix AMD RAPL regression (2026-02-17 23:27:52 -0600)

----------------------------------------------------------------
turbostat-2026.02.14-AMD-RAPL-fix

Fix a recent AMD regression due to errant code cleanup.

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

 tools/power/x86/turbostat/turbostat.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
author maintainer
#1 lore raw

PATCH 1/1 tools/power turbostat: Fix AMD RAPL regression

From: Len Brown <[email protected]>

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

Two recent cleanup patches that were not supposed to change anything broke the core_id code needed for AMD RAPL initialization:

commit 070e92361eec ("tools/power turbostat: Enhance HT enumeration") commit ddf60e38ca04 ("tools/power turbostat: Simplify global core_id calculation")

---
 tools/power/x86/turbostat/turbostat.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/power/x86/turbostat/turbostat.c +1 -2
index 1aace9b3269e..1a2671c28209 100644
@@ -5164,7 +5164,7 @@ static inline int get_rapl_domain_id(int cpu)
 	if (!platform->has_per_core_rapl)
 		return cpus[cpu].package_id;
 
-	return GLOBAL_CORE_ID(cpu, cpus[cpu].package_id);
+	return GLOBAL_CORE_ID(cpus[cpu].core_id, cpus[cpu].package_id);
 }
 
 /*
@@ -9633,7 +9633,6 @@ void topology_probe(bool startup)
 	}
 	topo.max_core_id = max_core_id;	/* within a package */
 	topo.max_package_id = max_package_id;
-	topo.num_cores = (max_core_id + 1) * topo.num_packages;	/* per system */
 
 	topo.cores_per_node = max_core_id + 1;
 	if (debug > 1)
Signature · 1 line
2.45.2
merge bot Merged
#2 lore raw
In reply to Len Brown
The pull request you sent on Tue, 17 Feb 2026 23:36:51 -0600:

The pull request you sent on Tue, 17 Feb 2026 23:36:51 -0600:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git tags/turbostat-2026.02.14-AMD-RAPL-fix

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7ad54bbbc9c512ba3bc90e4368264bcf15c25759

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html