]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools/power turbostat: Dump CPUID(1) consistently with CPUID(6)
authorLen Brown <len.brown@intel.com>
Fri, 5 Dec 2025 16:26:40 +0000 (11:26 -0500)
committerLen Brown <len.brown@intel.com>
Wed, 4 Feb 2026 20:52:11 +0000 (14:52 -0600)
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>
tools/power/x86/turbostat/turbostat.c

index c4c8b6315fd26e0a5a0ebb89488a062339516d50..a209c5d87ff7520f9c1659c36b6c73cff32bc8c7 100644 (file)
@@ -8826,15 +8826,15 @@ void process_cpuid()
                fputc('\n', outf);
 
                fprintf(outf, "CPUID(0x80000000): max_extended_levels: 0x%x\n", max_extended_level);
-               fprintf(outf, "CPUID(1): %s %s %s %s %s %s %s %s %s %s\n",
-                       ecx_flags & (1 << 0) ? "SSE3" : "-",
-                       ecx_flags & (1 << 3) ? "MONITOR" : "-",
-                       ecx_flags & (1 << 6) ? "SMX" : "-",
-                       ecx_flags & (1 << 7) ? "EIST" : "-",
-                       ecx_flags & (1 << 8) ? "TM2" : "-",
-                       edx_flags & (1 << 4) ? "TSC" : "-",
-                       edx_flags & (1 << 5) ? "MSR" : "-",
-                       edx_flags & (1 << 22) ? "ACPI-TM" : "-", edx_flags & (1 << 28) ? "HT" : "-", edx_flags & (1 << 29) ? "TM" : "-");
+               fprintf(outf, "CPUID(1): %sSSE3 %sMONITOR %sSMX %sEIST %sTM2 %sTSC %sMSR %sACPI-TM %sHT %sTM\n",
+                       ecx_flags & (1 << 0) ? "" : "No-",
+                       ecx_flags & (1 << 3) ? "" : "No-",
+                       ecx_flags & (1 << 6) ? "" : "No-",
+                       ecx_flags & (1 << 7) ? "" : "No-",
+                       ecx_flags & (1 << 8) ? "" : "No-",
+                       edx_flags & (1 << 4) ? "" : "No-",
+                       edx_flags & (1 << 5) ? "" : "No-",
+                       edx_flags & (1 << 22) ? "" : "No-", edx_flags & (1 << 28) ? "" : "No-", edx_flags & (1 << 29) ? "" : "No-");
        }
 
        probe_platform_features(family, model);