From patchwork Wed Mar 1 05:27:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 9597559 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 3E2D1600CB for ; Wed, 1 Mar 2017 05:36:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 316682842B for ; Wed, 1 Mar 2017 05:36:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24ECE284DD; Wed, 1 Mar 2017 05:36:13 +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 B271428410 for ; Wed, 1 Mar 2017 05:36:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932AbdCAFgE (ORCPT ); Wed, 1 Mar 2017 00:36:04 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:35137 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750787AbdCAFfX (ORCPT ); Wed, 1 Mar 2017 00:35:23 -0500 Received: by mail-qk0-f195.google.com with SMTP id n127so8222557qkf.2; Tue, 28 Feb 2017 21:35:22 -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=qMyPF74Xh0DGzI8RRB1RY3E6oD4YvsG/xHqo/PkVUgI=; b=K3ZJNDZSQnUN8aLolMawE315q076AFEf0fVClWupPAAtQe54jSeGvxtPkExkag1agW PLdLfOnCmy2DJwtrBJScnJEdZKx8r/ORlsTIaF86uRr+VhYOkHPdKEVYu0tCF+TopysY k4jeDVQ6DXdFaAqPRdwaDu5TnLDtcO4MAeAsS/787/krHP7W286hX1dXUeTLPsVntT4J hejOmiKDWWie7hWVbNsfH8heVBMZ1lQGejiPdi+8jNnZiWzrDJy+2UlNPyB6Op7raxQ7 SCXk9TturKLeQ2oYhblAtUzu4mZkD+kxEeNrw6oUyH5MXHS+QEnaarH+K2j6yoM282QD 13AQ== 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=qMyPF74Xh0DGzI8RRB1RY3E6oD4YvsG/xHqo/PkVUgI=; b=i7uFWGnpFHyCoTdNQg7fzQPz2ffywXs6cs76VTADkZaVJQbUqbPz6gkub/bfp5wzD0 RjB0853MQYADaSF8tPafmN/n3Js2FUpYBD2t70L++jkxjITkrrHFHprjUG6bdbsgAhbT z+WKuOZc7rorXMDpvpnOd9jt+nSU06khsMJd7WTMS1Qicfn1P61DRN+taYPPcw1bUpXS CrJzYR7H99BFn1XE0S0+KNKY4tQyz54W81vrrHBW9ko07fiitLFyfVaw1cXJV/Ejfqhs 05PJ7HMPWbcLSgR6zUHpybdqcjEVvCtEGOkgdE7+uIDmiubRjA2bs/Q47MfxvYz92o74 bZWw== X-Gm-Message-State: AMke39kqr/4xCi2GTpATcsCmWzmgjZZG+t7+Pv39vh2z0iCM93yAgdg8PUIN5VA/dTIbAg== X-Received: by 10.237.59.28 with SMTP id p28mr8045697qte.133.1488346122692; Tue, 28 Feb 2017 21:28:42 -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.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Feb 2017 21:28:41 -0800 (PST) From: Len Brown To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Len Brown Subject: [PATCH 29/44] tools/power turbostat: skip unused counters on BDX Date: Wed, 1 Mar 2017 00:27:33 -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 Skip these two counters on BDX, as they are always zero: cc7, pc7 Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 67a275882a8d..334c4c29d4b5 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -2612,6 +2612,19 @@ int is_dnv(unsigned int family, unsigned int model) } return 0; } +int is_bdx(unsigned int family, unsigned int model) +{ + + if (!genuine_intel) + return 0; + + switch (model) { + case INTEL_FAM6_BROADWELL_X: + case INTEL_FAM6_BROADWELL_XEON_D: + return 1; + } + return 0; +} int is_skx(unsigned int family, unsigned int model) { @@ -3933,6 +3946,10 @@ void process_cpuid() BIC_NOT_PRESENT(BIC_CPU_c7); BIC_NOT_PRESENT(BIC_Pkgpc7); } + if (is_bdx(family, model)) { + BIC_NOT_PRESENT(BIC_CPU_c7); + BIC_NOT_PRESENT(BIC_Pkgpc7); + } if (has_hsw_msrs(family, model)) { BIC_PRESENT(BIC_Pkgpc8); BIC_PRESENT(BIC_Pkgpc9);