tools/power turbostat: SGX state should print only if --debug
authorLen Brown <len.brown@intel.com>
Wed, 6 Apr 2016 21:15:54 +0000 (17:15 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Apr 2016 20:18:30 +0000 (22:18 +0200)
The CPUID.SGX bit was printed, even if --debug was used

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/x86/turbostat/turbostat.c

index ee1551b6fa0135a0827c141553fa5330a1e7d632..e2440df6029e77f10be6065fcfed34b67978f939 100644 (file)
@@ -3187,7 +3187,7 @@ void process_cpuid()
        if (debug)
                decode_misc_enable_msr();
 
-       if (max_level >= 0x7) {
+       if (max_level >= 0x7 && debug) {
                int has_sgx;
 
                ecx = 0;