Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1252369lqh; Mon, 6 May 2024 01:40:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/vWBo9+jmzoZtP0ZnGjWcgWhlaX17fCZd/ep7ZXpohsZQ0SWVF2nrzkM4gn60bYP5JmlPIjS6YrW+DoX3X1zzGsbc6binacCOoRs3aw== X-Google-Smtp-Source: AGHT+IFlkRuzy8S8kvbqzNUma2S0wfj17SQHIfiwRKCZAgv1xVLD3jbwowYBOJn8XYmU1m9Y2tU3 X-Received: by 2002:a17:907:2d27:b0:a59:c7d9:9d39 with SMTP id gs39-20020a1709072d2700b00a59c7d99d39mr2247879ejc.10.1714984834839; Mon, 06 May 2024 01:40:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714984834; cv=pass; d=google.com; s=arc-20160816; b=ejTtpbwxtP1JgPkX21cthKqa/W/RPfvzksTAUWn83FzQSQjbMAnyFaqWcQLXbMM1QE +csydcOIlCRtMwRmt7a9kpJNdmoTwyMzPP4zDqFLVr1qHnu13fAvtXe/pxExWVjRgFDM x4BVxtCnRpBQ/thZ/gF+HQWbSOz3K+dbjkWIAfbcQnMTsBc5jyiu3yCZ/d4oK4MS+Tng ezhYG/Djj+W/TQ0cLT3Gihqc4nduoqLmRWX4jzlXq+D3mgRDPFGltPFK2kZxH+V8dlhs 59NQ6Cl/L/4b5iuNFh8ttnxMTr2wL/AM2fyZEpgfo/L+kQojIsvIiOLYFv76S73OyUra sQrg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=yDKgFxP0GNIh308SQjmPmBB49myLZ4gmKdef44yoRgo=; fh=YIbDDeMys0vZ6+BeYE4AiHdeUXP5XBrU6t/nfktz75w=; b=1ExsZStBgROgmfcYXLOCTe9ps4mV3DqqvflpwUzax5OFRYJ3zXE5eU9EaPQgJOTiTy m/npDE3jsNDZky4FR/Bf7unrHrOx92asLuZ98vuNGjZizmS/MGm/HBG2/1x2nXibh0QS R190GnDErryS0posXM53k6Dr7vLVcFIutTtS4Ui6p67Bx8rL2Y27hIjINazW1SaYPKBE Q+MmpizlU06hdiaa9gA1kHhMvvDeNrc0K+i+VNrt6PdZnIO9nE5vdrVFSiRjKGRXrU6z MRfdQSRE/b+k6EPVAxzrX0WHM4NwzmH38y/EzIuP9IeLpyj7T29o4O0Nom2tCO7BFLUe 3VxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K04aJ6ld; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-169512-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169512-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q15-20020a056402040f00b00571fcccf618si4534298edv.507.2024.05.06.01.40.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 01:40:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169512-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K04aJ6ld; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-169512-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169512-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8335D1F228A8 for ; Mon, 6 May 2024 08:40:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57B681411C8; Mon, 6 May 2024 08:40:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K04aJ6ld" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 9BA4D42052; Mon, 6 May 2024 08:40:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714984825; cv=none; b=WS/Z/9oP7w56K5uM0XGhlHXuMm8zqv7Fj8KbHqcVPJmcdtisIxC2jKDEKQNigIZr8EMJ6xHfxjnAYWLzAAUuKkN4wELFKDQ52ItR/Fb36aK6LukrrlEABYPytLbg8a/OCSVltNHN62CqlgqkLG/1TKBOvpkokkA6qvQbCBG6NTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714984825; c=relaxed/simple; bh=IJfokw2N7A5py7k8ePC8gToDa+6No8AkVv40u96rl0U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WtPMYClhr1GB3titST2PluY4nVUV19mhGgq6uVU11oYFVfpYLZxGDCG9HtgRKR0zkzDACoiOVYnupxm4/pkxezXrUjWrUocNz+3WQZ8vLPjAaTTcmuEwfYvva+Ps56aFQiIR+nOuMYik+W0HCOoAtq2bx4hgSGdnsgxKjVTDuk0= 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=K04aJ6ld; arc=none smtp.client-ip=192.198.163.18 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=1714984824; x=1746520824; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IJfokw2N7A5py7k8ePC8gToDa+6No8AkVv40u96rl0U=; b=K04aJ6ld41uVsmR3Esi0y6TqzM7C6JfAuiKaHSnk5f8xyWBZtPjdY+nR UIybn3btWd6KvtkYQG6oNx9Ysgi5gGAbleXtCOWIPmphR9RooTwMLEI76 10E/bwmQR02Q7+WgBpiiunIyiJAJIx2i394zOvk7LQ2MY4KnkWmFtg3Pl xpN1Jjc+KfrWnqp68VnTy/7FS6d0VntLPEx62wEKky6kkgr/349bSxTrA smMbZSN+yGMtLujoAs8YG8GykYgslPzZ13Jcsj/VobE761JwicMrMu94t aXFUN7D7EOBfUVaO3Wsi0vkpLQu4npPVrTBPc6LUOi49lixfQISjiJrRj A==; X-CSE-ConnectionGUID: 6ZfepsbERpir6OrjInoF6w== X-CSE-MsgGUID: pfU8bws0TfifXgWD2VIfig== X-IronPort-AV: E=McAfee;i="6600,9927,11064"; a="10562711" X-IronPort-AV: E=Sophos;i="6.07,257,1708416000"; d="scan'208";a="10562711" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 01:40:23 -0700 X-CSE-ConnectionGUID: bBKWrYWJRkaIUPF8fPgWdA== X-CSE-MsgGUID: 6R2UT/2ARYKIXMmUR2xudg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,257,1708416000"; d="scan'208";a="32604461" 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; 06 May 2024 01:40:21 -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, Rui Zhang , Artem Bityutskiy , Wendy Wang Subject: [PATCH] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest Date: Mon, 6 May 2024 16:48:06 +0800 Message-ID: <20240506084806.495816-1-zhenyuw@linux.intel.com> X-Mailer: git-send-email 2.43.0 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 08bba679678c..cdf44500783e 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 @@ -689,7 +689,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