diff options
| author | Len Brown <len.brown@intel.com> | 2026-02-04 04:30:49 +0300 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2026-02-04 23:52:12 +0300 |
| commit | b991074a5144d740ae3812a54e138aaaaf12dc7a (patch) | |
| tree | 5de4279cfc18b3a0dd696bc25c4d685bc2cba0ac | |
| parent | 041e975937123ee22a7925e468ab73b8a8991767 (diff) | |
| download | linux-b991074a5144d740ae3812a54e138aaaaf12dc7a.tar.xz | |
tools/power turbostat: Allow more use of is_hybrid flag
The "is_hybrid" is set and used only in !quiet mode.
Make it valid in both quiet and !quiet mode to allow more uses.
Signed-off-by: Len Brown <len.brown@intel.com>
| -rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 2dfc110ae483..75c865120656 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -8157,6 +8157,9 @@ void decode_feature_control_msr(void) if (no_msr) return; + if (quiet) + return; + if (!get_msr(base_cpu, MSR_IA32_FEAT_CTL, &msr)) fprintf(outf, "cpu%d: MSR_IA32_FEATURE_CONTROL: 0x%08llx (%sLocked %s)\n", base_cpu, msr, msr & FEAT_CTL_LOCKED ? "" : "UN-", msr & (1 << 18) ? "SGX" : ""); @@ -8921,7 +8924,7 @@ void process_cpuid() if (!quiet) decode_misc_enable_msr(); - if (max_level >= 0x7 && !quiet) { + if (max_level >= 0x7) { int has_sgx; ecx = 0; @@ -8930,9 +8933,10 @@ void process_cpuid() has_sgx = ebx & (1 << 2); - is_hybrid = edx & (1 << 15); + is_hybrid = !!(edx & (1 << 15)); - fprintf(outf, "CPUID(7): %sSGX %sHybrid\n", has_sgx ? "" : "No-", is_hybrid ? "" : "No-"); + if (!quiet) + fprintf(outf, "CPUID(7): %sSGX %sHybrid\n", has_sgx ? "" : "No-", is_hybrid ? "" : "No-"); if (has_sgx) decode_feature_control_msr(); |
