Skip to content

Commit bd1b660

Browse files
committed
tools/power turbostat: Dump CPUID(1) consistently with CPUID(6)
We dumped selected CPUID(1) features using a format that showed '-' for a missing feature. Not so friendly to parse a bunch of dashes when features are missing... For CPUID(1) adopt the format we used for CPUID(6): 'No-FEATURE' means that 'FEATURE' is not present. Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 16cc8f2 commit bd1b660

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tools/power/x86/turbostat/turbostat.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8826,15 +8826,15 @@ void process_cpuid()
88268826
fputc('\n', outf);
88278827

88288828
fprintf(outf, "CPUID(0x80000000): max_extended_levels: 0x%x\n", max_extended_level);
8829-
fprintf(outf, "CPUID(1): %s %s %s %s %s %s %s %s %s %s\n",
8830-
ecx_flags & (1 << 0) ? "SSE3" : "-",
8831-
ecx_flags & (1 << 3) ? "MONITOR" : "-",
8832-
ecx_flags & (1 << 6) ? "SMX" : "-",
8833-
ecx_flags & (1 << 7) ? "EIST" : "-",
8834-
ecx_flags & (1 << 8) ? "TM2" : "-",
8835-
edx_flags & (1 << 4) ? "TSC" : "-",
8836-
edx_flags & (1 << 5) ? "MSR" : "-",
8837-
edx_flags & (1 << 22) ? "ACPI-TM" : "-", edx_flags & (1 << 28) ? "HT" : "-", edx_flags & (1 << 29) ? "TM" : "-");
8829+
fprintf(outf, "CPUID(1): %sSSE3 %sMONITOR %sSMX %sEIST %sTM2 %sTSC %sMSR %sACPI-TM %sHT %sTM\n",
8830+
ecx_flags & (1 << 0) ? "" : "No-",
8831+
ecx_flags & (1 << 3) ? "" : "No-",
8832+
ecx_flags & (1 << 6) ? "" : "No-",
8833+
ecx_flags & (1 << 7) ? "" : "No-",
8834+
ecx_flags & (1 << 8) ? "" : "No-",
8835+
edx_flags & (1 << 4) ? "" : "No-",
8836+
edx_flags & (1 << 5) ? "" : "No-",
8837+
edx_flags & (1 << 22) ? "" : "No-", edx_flags & (1 << 28) ? "" : "No-", edx_flags & (1 << 29) ? "" : "No-");
88388838
}
88398839

88408840
probe_platform_features(family, model);

0 commit comments

Comments
 (0)