From: Len Brown <lenb@kernel.org>
To: torvalds@linux-foundation.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Len Brown <len.brown@intel.com>
Subject: [PATCH 1/1] tools/power turbostat: Fix AMD RAPL regression
Date: Tue, 17 Feb 2026 23:36:52 -0600 [thread overview]
Message-ID: <ef0e60083f768b32cda17b1b0ca9519405db89a6.1771392818.git.len.brown@intel.com> (raw)
In-Reply-To: <20260218054436.705622-1-lenb@kernel.org>
From: Len Brown <len.brown@intel.com>
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")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
tools/power/x86/turbostat/turbostat.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 1aace9b3269e..1a2671c28209 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -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)
--
2.45.2
next prev parent reply other threads:[~2026-02-18 5:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 5:36 [GIT PULL v2] turbostat-v2026.02.14+AMD Len Brown
2026-02-18 5:36 ` Len Brown [this message]
2026-02-18 19:05 ` pr-tracker-bot
-- strict thread matches above, loose matches on Subject: below --
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
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=ef0e60083f768b32cda17b1b0ca9519405db89a6.1771392818.git.len.brown@intel.com \
--to=lenb@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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®