From patchwork Wed Mar 1 05:27:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 9597553 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AAB4600CB for ; Wed, 1 Mar 2017 05:35:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D3E228410 for ; Wed, 1 Mar 2017 05:35:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 714BF28452; Wed, 1 Mar 2017 05:35:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0341928410 for ; Wed, 1 Mar 2017 05:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751881AbdCAFfi (ORCPT ); Wed, 1 Mar 2017 00:35:38 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:34405 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751867AbdCAFff (ORCPT ); Wed, 1 Mar 2017 00:35:35 -0500 Received: by mail-qk0-f193.google.com with SMTP id s186so8255209qkb.1; Tue, 28 Feb 2017 21:35:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references:reply-to:organization; bh=Dy4xBQz7Sd0+J5lu/eVYm51auBao4UUC3GoMqNm+ubg=; b=hufOOMtTjZjxcglD51GLgRuR6sxO+pPANGxtpp1UJJIIrTXBkJC72g7/YWxMsvBy6Z ZI84p1Awwv0gJRQKL5IJJHIJ2DhGsGA+FXKHbJsrTDN3/UMu6ardpVLMGZGRuluF9O3J oc+jgRN4UgfkJqTN5uY1EuEySwu2ZWrK4QR9V1aEDEQUzAUUWIvD1F93st2h/jg05T1d occrHujl0VGqACKapA+A8GOWGrGvZQDLxoXB8/TPgBXFKWR3291He3/zWzNX9VZ4NqRx AVsJ5LjDgedRk2y2JHVRC2kKS6fp0ZOx8JtDB6kQfKzUw/EVJVt8hjJqIuG+qhiX4e8N qNWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references:reply-to:organization; bh=Dy4xBQz7Sd0+J5lu/eVYm51auBao4UUC3GoMqNm+ubg=; b=IP5HIeIB4E9jE6FkZHjS7kYp+o0PPx1ChzweNBmymx+qL5jwuFlF3D4FbT8+fnTnh0 R1kJKds6diAVTXD6WqwgvJ3z1TTI4j1YeFhEBATeFCweljZ+Oi6EtAd9A9g1JfjOP+B/ Fy5tRgBEstm4ndPkOBMaNfxLqa+2oFN5LAKmy3x4IUILGgZjdVAu98VaGH66/P54EfYU e32ba6ScDVh0Hq3iymeIPGQNk/atlwb3mLcs8/Bv2FVDkn/kV4gNDJLLvjYSCVZLX6nS lhcn/KpYOXhwxHJD2lYhSlp5MVFkkgRdtiExgGTsYv21GL/taJZK6fsLwNTJDuYx2BXC grJg== X-Gm-Message-State: AMke39n/uCPLyVuA3a7bAcgWdj3CmKTy3eUQmfBpYCIc2N13BIdtjsq+n9lYKqtDFvQv5Q== X-Received: by 10.237.57.169 with SMTP id m38mr8441955qte.196.1488346113814; Tue, 28 Feb 2017 21:28:33 -0800 (PST) Received: from z87.localdomain (pool-96-230-116-151.bstnma.fios.verizon.net. [96.230.116.151]) by smtp.gmail.com with ESMTPSA id c141sm2530517qkb.10.2017.02.28.21.28.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Feb 2017 21:28:33 -0800 (PST) From: Len Brown To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Len Brown Subject: [PATCH 17/44] tools/power turbostat: decode CPUID(6).TURBO Date: Wed, 1 Mar 2017 00:27:21 -0500 Message-Id: X-Mailer: git-send-email 2.11.0.161.g6610af872 In-Reply-To: <20170301052748.27810-1-lenb@kernel.org> References: <20170301052748.27810-1-lenb@kernel.org> In-Reply-To: <678a3bd1b3de6d2ebf604e7d708bc8150bb667e9.1488345270.git.len.brown@intel.com> References: <678a3bd1b3de6d2ebf604e7d708bc8150bb667e9.1488345270.git.len.brown@intel.com> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Len Brown show the CPUID feature for turbo to clarify the case when it may not be shown in MISC_ENABLE CPUID(6): APERF, TURBO, DTS, PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, EPB cpu4: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT TURBO) Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index da6ec640caf7..1011b5f7f21f 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -3626,6 +3626,7 @@ void process_cpuid() { unsigned int eax, ebx, ecx, edx, max_level, max_extended_level; unsigned int fms, family, model, stepping; + unsigned int has_turbo; eax = ebx = ecx = edx = 0; @@ -3696,6 +3697,7 @@ void process_cpuid() do_dts = eax & (1 << 0); if (do_dts) BIC_PRESENT(BIC_CoreTmp); + has_turbo = eax & (1 << 1); do_ptm = eax & (1 << 6); if (do_ptm) BIC_PRESENT(BIC_PkgTmp); @@ -3707,9 +3709,10 @@ void process_cpuid() has_epb = ecx & (1 << 3); if (debug) - fprintf(outf, "CPUID(6): %sAPERF, %sDTS, %sPTM, %sHWP, " + fprintf(outf, "CPUID(6): %sAPERF, %sTURBO, %sDTS, %sPTM, %sHWP, " "%sHWPnotify, %sHWPwindow, %sHWPepp, %sHWPpkg, %sEPB\n", has_aperf ? "" : "No-", + has_turbo ? "" : "No-", do_dts ? "" : "No-", do_ptm ? "" : "No-", has_hwp ? "" : "No-",