Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3061009lqo; Tue, 14 May 2024 20:13:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKwjO9y8FAM1HK3auRgLvv5Apy1Rq3z6S88s/IYoUckxpfBzjVZjzfu5KymNlaUCOhkbIQNOTN8SPIW4cfD11ySnOQy/VGRnYXIQ8BAg== X-Google-Smtp-Source: AGHT+IEUoEsEz9dTioShKbifYixWMqifKGc9Xx7AamGGM3aV0zbRguABGuqRFTThYjO0FR8ynby/ X-Received: by 2002:a05:620a:148f:b0:792:bf0f:ac1d with SMTP id af79cd13be357-792c75f29d1mr1558750585a.52.1715742807339; Tue, 14 May 2024 20:13:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715742807; cv=pass; d=google.com; s=arc-20160816; b=AE7Vzf4EVO5eaARNl1Fiznvc3PC2nLWnsMMBzDG9mTyUVyJsDo2n6NDgUB1ZXbyNaO iYSoL+WgPAcAMgexoKpHDjNs1F6DkUFVSyHvuOXdz55JWZiAH7XKGMliaNhjyl67KmJ3 MyRPPa/GGjpCc3IOqMVoUEW9rErC3asfaqHx37uD+T9OkMab1x6b8LLqWJfnu3zWu0JZ ZGBA+s7O3zj37JV7aMXRXQezZki0mJZqr1Fp08c6SwvZbYkhSDEdCWC+d0x/87vv2aYd EuFF1VGp9A5RHVkbS0ySopUgcesxk0y28fMfSsrJGAkxeDlFo8tMHDdYMHYri6uDsNmv 9ywg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=tEjM6xvJRK42ApEOS4o4/NdR3QjX9fT6gcjB4ND2FTg=; fh=2H3txxJ91EemQ3BA5PWevd02PTv/JuFxVzfokPS9kf8=; b=Yx06vMhf6iWm2JJ3IiQnB1TP1475ODgxXCsI0k4SpARzIKDb1wzmgOG6k2+J/yM8sx KqS5tVWF7rKig/6LEz4+L/wK91BUl4rV7Yvlqxa517h5ye79dR5chehHk95yrWqNA+Zf y/FgCzPUwIUc3dBpkSLzb2llFS6CxrBer2DIeDEtOLa43w6oPpMXcVzLIOCxwkwgPLpd N8y5jXp5Q9JbKz2t0JCcdEbBi1jRhdW2h+nMpsAsSPU62VkXHaeCAY9h8p82AgvwdV4l rndV/R++pA0q7v0hrgmvaMGfEihbDbEWpoQuftjGNm5+8GGQ1+gZkizOOtvvuZ3Lkgyh oN0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="fL/D/gND"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-179368-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf336d9bsi1391030985a.390.2024.05.14.20.13.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 20:13:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179368-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="fL/D/gND"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-179368-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 165961C21526 for ; Wed, 15 May 2024 03:13:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DD5E376EC; Wed, 15 May 2024 03:13:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fL/D/gND" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 203FA3C2F; Wed, 15 May 2024 03:13:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715742798; cv=none; b=Qy8zTuxSThhuTfwLeFiVVKB9Aj+7K/Wl6YsxN0+C9wamiAeArdxgM/2d/DOTxGvk7faE/hNvOXAr+ISKgpMjeokg0rlq6Cr/j9/t/z0CbD5JCkbQjuLAyJAZExuaZfpSbnZbMkNgjpUyPqbgjNBrsB5Tn21mx9EcdTlYCtE+gcc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715742798; c=relaxed/simple; bh=uB9Hl02KjTkQ8kSDlHRuvYVYzS140KUlSV2TwxcCTHM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q2cZIbdvQiuGmrMY3cahiJ4mDV395E70yWn207ZQxI9IfkzXkF7imQDCyUt8gN++Dih9Lzj5DvrSssyw9xLAitf+JXtrwR/PF9dQGuLfeY+jdBYozSQXgFxOBc7Pa22qSbSzITTcGzy3WQ/9FEaaApvgr2UqmqzrancpznYYQxU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fL/D/gND; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715742797; x=1747278797; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uB9Hl02KjTkQ8kSDlHRuvYVYzS140KUlSV2TwxcCTHM=; b=fL/D/gNDmASB7QBYhTWvp9841ovn9ijEB751AO6DbExI0yScAIHm4dcd jXkN7a0EnKLqShNcV0KylRJys6LYVey6kDW+5fv8qOdRojklbWGpZmcrm jkKKj6ifPnD1T8cn4Mg3P7ZIQPZO0fFqkXrJn6G3sk8APagRoz7JUa9Nf rHvlfVAOuR73On2y0SH4x+d5e0yHTpT7UGRirX9CUEmECiweb76F6ZCSb 9g1vRcabXQb8cbKIfE4YPLH53BSl2BMMOQwOaTFUinCT8G5hNu4iDE05r OPR6/2bG8qYWZMMAxGZVpEH9NPqHNSf4IPNTMh8GSmhbrxz4cua3cTssH g==; X-CSE-ConnectionGUID: DqM7hr9FSeKAgVS/0zmFlA== X-CSE-MsgGUID: jElZ4QA2R/a41a+ggQAEkw== X-IronPort-AV: E=McAfee;i="6600,9927,11073"; a="14713386" X-IronPort-AV: E=Sophos;i="6.08,160,1712646000"; d="scan'208";a="14713386" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2024 20:13:16 -0700 X-CSE-ConnectionGUID: 1Vaphy8DTH2zttEv04+Nig== X-CSE-MsgGUID: b75J+r8tT2qY1V7p85kAqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,160,1712646000"; d="scan'208";a="35434310" Received: from zwan2-desk1.sh.intel.com ([10.239.160.154]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2024 20:13:14 -0700 From: Zhenyu Wang To: peterz@infradead.org Cc: kan.liang@linux.intel.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, x86@kernel.org, Rui Zhang , Artem Bityutskiy , Wendy Wang Subject: [PATCH RESEND] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest Date: Wed, 15 May 2024 11:21:58 +0800 Message-ID: <20240515032158.12845-1-zhenyuw@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240506084806.495816-1-zhenyuw@linux.intel.com> References: <20240506084806.495816-1-zhenyuw@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Package C2 residency counter is also available on Sierra Forest. So add it support in srf_cstates. Cc: Rui Zhang Cc: Artem Bityutskiy Cc: Wendy Wang Fixes: 3877d55a0db2 ("perf/x86/intel/cstate: Add Sierra Forest support") Signed-off-by: Zhenyu Wang --- arch/x86/events/intel/cstate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c index e64eaa8dda5a..4cd36848cfff 100644 --- a/arch/x86/events/intel/cstate.c +++ b/arch/x86/events/intel/cstate.c @@ -64,7 +64,7 @@ * perf code: 0x00 * Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL, * KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL, - * RPL,SPR,MTL + * RPL,SPR,MTL,SRF * Scope: Package (physical package) * MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter. * perf code: 0x01 @@ -683,7 +683,8 @@ static const struct cstate_model srf_cstates __initconst = { .core_events = BIT(PERF_CSTATE_CORE_C1_RES) | BIT(PERF_CSTATE_CORE_C6_RES), - .pkg_events = BIT(PERF_CSTATE_PKG_C6_RES), + .pkg_events = BIT(PERF_CSTATE_PKG_C2_RES) | + BIT(PERF_CSTATE_PKG_C6_RES), .module_events = BIT(PERF_CSTATE_MODULE_C6_RES), }; -- 2.43.0