Skip to contentSkip to conversation

tools/power turbostat: fix decoding of HWP_STATUS

PATCH New [email protected] 1 participant 1 message Jan 25, 2023 Turbostat utility

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/power turbostat: fix decoding of HWP_STATUS

From: Antti Laakso <[email protected]>

The "excursion to minimum" information is in bit2
in HWP_STATUS MSR. Fix the bitmask used for
decoding the register.

---
 tools/power/x86/turbostat/turbostat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/x86/turbostat/turbostat.c +1 -1
index aba460410dbd..3d576a7e877b 100644
@@ -4426,7 +4426,7 @@ int print_hwp(struct thread_data *t, struct core_data *c, struct pkg_data *p)
 
 	fprintf(outf, "cpu%d: MSR_HWP_STATUS: 0x%08llx "
 		"(%sGuaranteed_Perf_Change, %sExcursion_Min)\n",
-		cpu, msr, ((msr) & 0x1) ? "" : "No-", ((msr) & 0x2) ? "" : "No-");
+		cpu, msr, ((msr) & 0x1) ? "" : "No-", ((msr) & 0x4) ? "" : "No-");
 
 	return 0;
 }
Signature · 1 line
2.38.1