From patchwork Thu Dec 1 19:57:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 28538 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp458722wrr; Thu, 1 Dec 2022 12:02:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf4p4tW/mYkUFnaq9NjCT8uAsjMqjUtMc7D7v6niXe3UNpBWegxnIJiF0bRFrSKl0VhPW7YF X-Received: by 2002:aa7:db90:0:b0:459:aa70:d4fd with SMTP id u16-20020aa7db90000000b00459aa70d4fdmr59144901edt.162.1669924930753; Thu, 01 Dec 2022 12:02:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669924930; cv=none; d=google.com; s=arc-20160816; b=lIkLLM5UEXEL7ZsfAQPoV6JPHnMQLcAO9OzSViLdW3CLk/2r6AFTVNSzU5groxDZEK +LlAvLkWDWyyy8Um9v915flqsqvhyIuN2c2Q2KEchgtGN0+Bkl55vbF9BOi8HKOvm1xy rmmpQoClZ0Oat3A/oJjyE7RHA0hc0yW0GOCiLryTAJK3a/1qEuN+kmVCDK9jQTeQQT9H M0/DF5WfyxPKVoBkjilvJqis2WlCTB/nAL2W9wsV1MatRUVpKAKN+Gl7NkxPLFhXKXED +m4cRGekJLDQhMa7IzIKSgDDPRt2VaKB35NgIwb2AruoIDQqKiAPJPnVm2wUV4Oe/CPJ qKAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rpfh17W3Fsw+/QHUWbUn6fVxTg7O1AdjSaH0RYa6TIQ=; b=jHEabwIiNt3SlkwYSIdXBOlN7SSv0hT1DaOIXTuEuH6JuyFxN3SD18+zIu9XDJRe6s uJPHgyIxMU00SfI5iqaFmtuhi1xWFbJAkTuDHJof8QmCk3+vzLC4V3t3hP750Nl5V5aT x597qXF1HauFDvN+YNicDVWC7mHmnOMIHSkqLUIxdnO8gzlrDeg10p0HA/TxFU55qEPW XegSE4ZqMLcLQtDtA3x6Y2FvkeFxcqsg1JKOGy63W/POr23dh6Mh9C71hJMFE9oLHyVK qnsP7vsgEtgfFlz1yCGwolw6qy7pdV7FN0NxmvQg6RmfSyDB6wXQxKtDJxSF8tHb9ccM QNLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fnRZI99L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a50d585000000b00458d1c48708si4174578edi.303.2022.12.01.12.01.26; Thu, 01 Dec 2022 12:02:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fnRZI99L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231274AbiLAT5l (ORCPT + 99 others); Thu, 1 Dec 2022 14:57:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbiLAT5T (ORCPT ); Thu, 1 Dec 2022 14:57:19 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E33C8BA605 for ; Thu, 1 Dec 2022 11:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669924638; x=1701460638; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fKB/9fd1T4ldG6F8XD4RYHrEodmKy4TFikEQOjDIV3o=; b=fnRZI99LjN/+XmwhmDvCRJhiyFM0gxvA19NUKh2JrzIPhRErLtH617Iw j27ks7hgkJJjw9BSBViQaKinnRkR1D3CXduA7WV0h+CTWtyn2/rSg6mrE F5P4Oj1ick4Dfht/pBfHmIXXiSpKtR+AQ4MPw9uJicyiuzD18AiwpqVVn 8qlPo1UfwWB+wzCb0KjAqx6jwn6s4fcKJZnyBMBTGBdHBzsx0JAIP54s4 Yhln4+edGeaMPFr7/jrf0rZfQxdt5jrdeDm03XkngKgEBJyieyc36hkKk vFI0S7UgZG/0j8htu+nyTxvBjghydDiMe0kPafJ72f6xN5Ptaw2uRvby6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="303391882" X-IronPort-AV: E=Sophos;i="5.96,210,1665471600"; d="scan'208";a="303391882" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2022 11:57:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="708205126" X-IronPort-AV: E=Sophos;i="5.96,210,1665471600"; d="scan'208";a="708205126" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga008.fm.intel.com with ESMTP; 01 Dec 2022 11:57:17 -0800 From: kan.liang@linux.intel.com To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, irogers@google.com, Kan Liang Subject: [PATCH 6/9] perf/x86/cstate: Add Meteor Lake support Date: Thu, 1 Dec 2022 11:57:01 -0800 Message-Id: <20221201195704.2330866-6-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221201195704.2330866-1-kan.liang@linux.intel.com> References: <20221201195704.2330866-1-kan.liang@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751043204167250914?= X-GMAIL-MSGID: =?utf-8?q?1751043204167250914?= From: Kan Liang Meteor Lake is Intel's successor to Raptor lake. From the perspective of Intel cstate residency counters, there is nothing changed compared with Raptor lake. Share adl_cstates with Raptor lake. Update the comments for Meteor Lake. Reviewed-by: Andi Kleen Signed-off-by: Kan Liang --- arch/x86/events/intel/cstate.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c index a2834bc93149..3019fb1926e3 100644 --- a/arch/x86/events/intel/cstate.c +++ b/arch/x86/events/intel/cstate.c @@ -41,6 +41,7 @@ * MSR_CORE_C1_RES: CORE C1 Residency Counter * perf code: 0x00 * Available model: SLM,AMT,GLM,CNL,ICX,TNT,ADL,RPL + * MTL * Scope: Core (each processor core has a MSR) * MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter * perf code: 0x01 @@ -51,50 +52,50 @@ * perf code: 0x02 * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW, * SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX, - * TGL,TNT,RKL,ADL,RPL,SPR + * TGL,TNT,RKL,ADL,RPL,SPR,MTL * Scope: Core * MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter * perf code: 0x03 * Available model: SNB,IVB,HSW,BDW,SKL,CNL,KBL,CML, - * ICL,TGL,RKL,ADL,RPL + * ICL,TGL,RKL,ADL,RPL,MTL * Scope: Core * MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter. * perf code: 0x00 * Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL, * KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL, - * RPL,SPR + * RPL,SPR,MTL * Scope: Package (physical package) * MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter. * perf code: 0x01 * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,KNL, * GLM,CNL,KBL,CML,ICL,TGL,TNT,RKL, - * ADL,RPL + * ADL,RPL,MTL * Scope: Package (physical package) * MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter. * perf code: 0x02 * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW, * SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX, - * TGL,TNT,RKL,ADL,RPL,SPR + * TGL,TNT,RKL,ADL,RPL,SPR,MTL * Scope: Package (physical package) * MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter. * perf code: 0x03 * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,CNL, - * KBL,CML,ICL,TGL,RKL,ADL,RPL + * KBL,CML,ICL,TGL,RKL,ADL,RPL,MTL * Scope: Package (physical package) * MSR_PKG_C8_RESIDENCY: Package C8 Residency Counter. * perf code: 0x04 * Available model: HSW ULT,KBL,CNL,CML,ICL,TGL,RKL, - * ADL,RPL + * ADL,RPL,MTL * Scope: Package (physical package) * MSR_PKG_C9_RESIDENCY: Package C9 Residency Counter. * perf code: 0x05 * Available model: HSW ULT,KBL,CNL,CML,ICL,TGL,RKL, - * ADL,RPL + * ADL,RPL,MTL * Scope: Package (physical package) * MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter. * perf code: 0x06 * Available model: HSW ULT,KBL,GLM,CNL,CML,ICL,TGL, - * TNT,RKL,ADL,RPL + * TNT,RKL,ADL,RPL,MTL * Scope: Package (physical package) * */ @@ -686,6 +687,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &adl_cstates), X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &adl_cstates), X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, &adl_cstates), + X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE, &adl_cstates), + X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, &adl_cstates), { }, }; MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match);