diff options
| author | Len Brown <len.brown@intel.com> | 2026-04-30 21:40:36 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2026-10-03 13:00:55 -0400 |
| commit | 5e940dd96bef6ca03b3b1b4740351237e5ec17e3 (patch) | |
| tree | dda2580dcaa87b02329ba16ca8fc7251ce78e703 | |
| parent | 767c64414c4c5fffd6cbc3a1cf1fb8138b28645b (diff) | |
tools/power turbostat: Fix CWF PMT off-by-one
Fix off-by-one error causing last CPU on CWF
to never get a pmt counter allocated.
Fixes: 5ce1e9bbb2a1 ("tools/power turbostat: Add CPU%c1e BIC for CWF")
Assisted-by: GitHub Copilot (claude-sonnet-4.6)
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 8e017b4dbc6c..795946bcfd94 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -10453,7 +10453,7 @@ void pmt_init(void) mod_num = 0; /* Relative module number for current PMT file. */ /* Open the counter for each CPU. */ - for (cpu_num = 0; cpu_num < topo.max_cpu_num;) { + for (cpu_num = 0; cpu_num <= topo.max_cpu_num;) { if (cpu_is_not_allowed(cpu_num)) goto next_loop_iter; |
