diff options
| author | Len Brown <len.brown@intel.com> | 2026-04-22 00:26:33 +0300 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2026-04-22 00:35:40 +0300 |
| commit | 3ae6bafa104d93ddc525b8de547bf66b43fcaf10 (patch) | |
| tree | a6f0f1229c2bdaa5bf9b56a7537c37a95b50dc6f | |
| parent | 028ef9c96e96197026887c0f092424679298aae8 (diff) | |
| download | linux-3ae6bafa104d93ddc525b8de547bf66b43fcaf10.tar.xz | |
tools/power turbostat: Fix AMD RAPL regression on big systems
turbostat.c:8688: rapl_perf_init: Assertion `next_domain < num_domains' failed.
The initial fix for this regression was incomplete, as it did not
handle multi-package systems with sparse core ids.
Fixes: ef0e60083f76 ("tools/power turbostat: Fix AMD RAPL regression")
Signed-off-by: Len Brown <len.brown@intel.com>
| -rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index e9e8ef72395a..bea574d7aa68 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -5155,7 +5155,7 @@ static inline int get_rapl_num_domains(void) if (!platform->has_per_core_rapl) return topo.num_packages; - return topo.num_cores; + return GLOBAL_CORE_ID(topo.max_core_id, topo.num_packages) + 1; } static inline int get_rapl_domain_id(int cpu) |
