Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4496897ybx; Mon, 4 Nov 2019 14:23:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzwCos3WOsR6p8C2AdexllAWL8KaF+xlA/IzebZuIQRmryjp9DMEWpNm86CyVL8ibYkLkwL X-Received: by 2002:a50:8969:: with SMTP id f38mr32161591edf.211.1572906185451; Mon, 04 Nov 2019 14:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572906185; cv=none; d=google.com; s=arc-20160816; b=BVTPnbuMW+x5noyYaaF403TNJohvZ84eNbmB/M1hrIJMgLT6m9ZczjwPVJ6KHYFsit TttcT1dAsyXvKaXF2M+Cb4jxV49CS7vRZzhUZwyvQbmKSEvU2W72Kek1o2K10r8rgRqC g49mU7GwUcEV6siQ+UKpxaH9TKoo9X4zEFlBOdQ+3n4oZ2HfFumebG5bEt63zCdR7oWN /wZSvnI1gmrXeG6ggNFAbgpZJ600+E5GL4UT++sXZhpODUCykEEBoEVsTHIqCQ2+l2ar qauwmqg9f9WhpWJj/pgKst4SOtcq6dmEboazwz4U/iSrTIMHO5RxfpGyBk/COxFTXKfd cY1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xOsmXcNv+ETC+IcUa1oyOCeA9sG8THb95tnYhtI8pak=; b=JwPtlRvsfU7dVzihdDlfN5/IrUQDs6o2M1ghIPLYcXdoBGEdQR0V4GDqiZb4ZTjbEh jQGHVRGy5ZiL8htUQLwp5AWNfi+UOsBN4zA/cwKO29js1UiNms9/77DAWXRcjWZYmR5T DTtMWdNvBxxMO/9squgueyZbXEcd69zHDt2yKZjZKLLHd4BsqDZWgGN/5he/WMIqSZFI 8vp4g2hj+x8ZXYM50bmznpIRumVCZGznmqCPd+sXX42XPntOStX/0UR5wL21VD2JByK7 Mt5nZOoPLP9+nnevQx+xbOWEdpQvoAmcFfAM5xmYS5lylyqa14LCTdwBJUFQ77Xwh+j4 P3oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xx0OlU3w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si5396867ejz.434.2019.11.04.14.22.40; Mon, 04 Nov 2019 14:23:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xx0OlU3w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388936AbfKDWWE (ORCPT + 99 others); Mon, 4 Nov 2019 17:22:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:53400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388538AbfKDV5R (ORCPT ); Mon, 4 Nov 2019 16:57:17 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E5E2217F5; Mon, 4 Nov 2019 21:57:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572904636; bh=SdMDKzJ1hk6QRdsBvU2IGu5E+EuH4lEosEJzMyA5ovs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xx0OlU3wrJcYKzDGhFp/0JOLS+KR6zDd9kXSBCMPrKPMawpyPS+vnG3mfO6rubBmt eWlDvg3Ewtnllj045kFXrJZf9bP4TJCbutUimvBHeywiHopjQP5ANqAboiZkgYpQKB +OezJBGmlFeVn63sUJRP75NJvEJQIAF+PxfxADiw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Len Brown , Sasha Levin Subject: [PATCH 4.19 017/149] tools/power turbostat: fix goldmont C-state limit decoding Date: Mon, 4 Nov 2019 22:43:30 +0100 Message-Id: <20191104212135.963287914@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212126.090054740@linuxfoundation.org> References: <20191104212126.090054740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Len Brown [ Upstream commit 445640a563493f28d15f47e151e671281101e7dc ] When the C-state limit is 8 on Goldmont, PC10 is enabled. Previously turbostat saw this as "undefined", and thus assumed it should not show some counters, such as pc3, pc6, pc7. Signed-off-by: Len Brown Signed-off-by: Sasha Levin --- tools/power/x86/turbostat/turbostat.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 71cf7e77291ad..823bbc741ad7a 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -1953,11 +1953,12 @@ done: #define PCL_7S 11 /* PC7 Shrink */ #define PCL__8 12 /* PC8 */ #define PCL__9 13 /* PC9 */ -#define PCLUNL 14 /* Unlimited */ +#define PCL_10 14 /* PC10 */ +#define PCLUNL 15 /* Unlimited */ int pkg_cstate_limit = PCLUKN; char *pkg_cstate_limit_strings[] = { "reserved", "unknown", "pc0", "pc1", "pc2", - "pc3", "pc4", "pc6", "pc6n", "pc6r", "pc7", "pc7s", "pc8", "pc9", "unlimited"}; + "pc3", "pc4", "pc6", "pc6n", "pc6r", "pc7", "pc7s", "pc8", "pc9", "pc10", "unlimited"}; int nhm_pkg_cstate_limits[16] = {PCL__0, PCL__1, PCL__3, PCL__6, PCL__7, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV}; int snb_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCL_6N, PCL_6R, PCL__7, PCL_7S, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV}; @@ -1965,7 +1966,7 @@ int hsw_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCL__3, PCL__6, PCL__7, PCL_7S, int slv_pkg_cstate_limits[16] = {PCL__0, PCL__1, PCLRSV, PCLRSV, PCL__4, PCLRSV, PCL__6, PCL__7, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCL__6, PCL__7}; int amt_pkg_cstate_limits[16] = {PCLUNL, PCL__1, PCL__2, PCLRSV, PCLRSV, PCLRSV, PCL__6, PCL__7, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV}; int phi_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCL_6N, PCL_6R, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV}; -int bxt_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV}; +int glm_pkg_cstate_limits[16] = {PCLUNL, PCL__1, PCL__3, PCL__6, PCL__7, PCL_7S, PCL__8, PCL__9, PCL_10, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV}; int skx_pkg_cstate_limits[16] = {PCL__0, PCL__2, PCL_6N, PCL_6R, PCLRSV, PCLRSV, PCLRSV, PCLUNL, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV, PCLRSV}; @@ -3165,7 +3166,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model) case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: case INTEL_FAM6_ATOM_GOLDMONT_X: /* DNV */ - pkg_cstate_limits = bxt_pkg_cstate_limits; + pkg_cstate_limits = glm_pkg_cstate_limits; break; default: return 0; -- 2.20.1