Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

Len Brown b991074a 041e9759

+7 -3
+7 -3
tools/power/x86/turbostat/turbostat.c
··· 8157 8157 if (no_msr) 8158 8158 return; 8159 8159 8160 + if (quiet) 8161 + return; 8162 + 8160 8163 if (!get_msr(base_cpu, MSR_IA32_FEAT_CTL, &msr)) 8161 8164 fprintf(outf, "cpu%d: MSR_IA32_FEATURE_CONTROL: 0x%08llx (%sLocked %s)\n", 8162 8165 base_cpu, msr, msr & FEAT_CTL_LOCKED ? "" : "UN-", msr & (1 << 18) ? "SGX" : ""); ··· 8924 8921 if (!quiet) 8925 8922 decode_misc_enable_msr(); 8926 8923 8927 - if (max_level >= 0x7 && !quiet) { 8924 + if (max_level >= 0x7) { 8928 8925 int has_sgx; 8929 8926 8930 8927 ecx = 0; ··· 8933 8930 8934 8931 has_sgx = ebx & (1 << 2); 8935 8932 8936 - is_hybrid = edx & (1 << 15); 8933 + is_hybrid = !!(edx & (1 << 15)); 8937 8934 8938 - fprintf(outf, "CPUID(7): %sSGX %sHybrid\n", has_sgx ? "" : "No-", is_hybrid ? "" : "No-"); 8935 + if (!quiet) 8936 + fprintf(outf, "CPUID(7): %sSGX %sHybrid\n", has_sgx ? "" : "No-", is_hybrid ? "" : "No-"); 8939 8937 8940 8938 if (has_sgx) 8941 8939 decode_feature_control_msr();