[PATCH 20/24] tools/power turbostat: SGX state should print only if --debug

Tim Gardner tim.gardner at canonical.com
Wed Aug 24 20:49:49 UTC 2016


From: Len Brown <len.brown at intel.com>

BugLink: http://bugs.launchpad.net/bugs/1591802

The CPUID.SGX bit was printed, even if --debug was used

Signed-off-by: Len Brown <len.brown at intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
(cherry picked from commit 8ae7225591fd15aac89769cbebb3b5ecc8b12fe5)
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
 tools/power/x86/turbostat/turbostat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index ee1551b..e2440df 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -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;
-- 
2.7.4





More information about the kernel-team mailing list