From patchwork Tue Mar 14 17:00:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 69744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1892671wrd; Tue, 14 Mar 2023 10:37:09 -0700 (PDT) X-Google-Smtp-Source: AK7set9/2YgqOvuDuSO3R8BSmgWko+goVbSv3qFSdDbitvWzvywU6RFBoGiTNL+PvaGNY2w0wcSU X-Received: by 2002:a05:6a20:3d8e:b0:bc:e785:5ad3 with SMTP id s14-20020a056a203d8e00b000bce7855ad3mr15233432pzi.29.1678815428682; Tue, 14 Mar 2023 10:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678815428; cv=none; d=google.com; s=arc-20160816; b=yszJAx+lC37qrKwvtf7+t2IpLGDGNg0pe+dX14K+OpItGnTxcHlhS70De3Ze1pE82h Ril8ghNyQKyPRqO1yHrGatpUaVinIPmPc+w4O8dWFlQtIVbBtjtUILhLkoLunAhQChMA FpjERXSnvHK4LrISgewdh2yU65VTIam0MYjkI1X5tekDpl4p3tzVXOYYlkmBmRpjztjL EvFpnSFmTqgB+e3/JQKTgtlID2MT8J2T0UKEo1gcNxnM6U55mfoCBK0esggYUPSki3pA 3s3ZCVDldS6x/sJyxbWDC4nSXsD+8VuMO+D27hFOmuLKvcMrjVisUY/8at6sRxI07aUh tKFQ== 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=q0rav/+iBJPmITAniXCLDaovO6b9Slhdr1aKV3j48EQ=; b=n6znNZfO5ODuhoMtaAClll8T0i/l1Y0+rsBP+9iLuEc8zLHmY19tLsfmyDtltzIMfB UAKvf2PlYkJL0HEJFXrZSC8vSnlxfCnff+YaZ7iBMR6Aeo6BGthvCEnYxLVUSK1ItwVh MkkDxgEkKW1rfnH4o1HrKlEmoWukeniMT2eW+Wz9h/j9G1+7hU+fGzFow+4esg83ldYd WZdlcGuULUbEzIv32+DCYQoV2SRnEY2x4eMhstIZ7aksyGkoVNtnvaebl4VpUERN6eCW iulPxNHzHACAgjfR6wvkEazU3Q01E9YIk80YjIskVdnoN+IBbhLM7VOdEjc7ikxm3wZg ZVkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n0kfPQaf; 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 k3-20020a632403000000b005020ed55feasi2752164pgk.633.2023.03.14.10.36.53; Tue, 14 Mar 2023 10:37:08 -0700 (PDT) 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=n0kfPQaf; 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 S230370AbjCNRAw (ORCPT + 99 others); Tue, 14 Mar 2023 13:00:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbjCNRAs (ORCPT ); Tue, 14 Mar 2023 13:00:48 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99E7CA6BCB for ; Tue, 14 Mar 2023 10:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678813247; x=1710349247; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E4Veho/yd3aXlAmFcEMi+eBZxYh7bKd6lV0oR1Ua++4=; b=n0kfPQaf9nxMIr0Gy18JA62ZJKGD+CynI71GJ3GwtxJuEdEBwOf9e/A/ v9Q2tOsKFtus+ayLY9EsWOieTLfCKsNSvKkN0If0Rwe2DOtJivcJelRja HRXqGJbP2syJx3DZSi0awgntA5IO+N7+9hXQkwLjapdnkTSJVsQtAzgVg 5FCBKnBtQ3J2/iuFPBDFHe8aIZG9Ngycerbst3D2IEshChxgqaemZHBFL irmEjxqza2PBbG6ZrKqiFy4Me77y1xvSLVD+d6yM0zSzV4hB1TvaY3V9i NizSb11rNW+lmilsL/meJraqLdHwyJ7dqHIw5BxlZZik+fPWXNcfKJbEA Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="334971173" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="334971173" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 10:00:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="743379732" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="743379732" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga008.fm.intel.com with ESMTP; 14 Mar 2023 10:00:46 -0700 From: kan.liang@linux.intel.com To: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: ak@linux.intel.com, eranian@google.com, Artem Bityutskiy Subject: [PATCH 3/3] perf/x86/cstate: Add Granite Rapids support Date: Tue, 14 Mar 2023 10:00:41 -0700 Message-Id: <20230314170041.2967712-3-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230314170041.2967712-1-kan.liang@linux.intel.com> References: <20230314170041.2967712-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,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED 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?1760365567370018729?= X-GMAIL-MSGID: =?utf-8?q?1760365567370018729?= From: Artem Bityutskiy Granite Rapids Xeon is successor or Emerald Rapids Xeon, and it will use the same C-state residency counters as Emerald Rapids (and previous Xeons, all the way back to Ice Lake Xeon). Add Granite Rapids Xeon support. Signed-off-by: Artem Bityutskiy --- arch/x86/events/intel/cstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c index 551741e79e03..835862c548cc 100644 --- a/arch/x86/events/intel/cstate.c +++ b/arch/x86/events/intel/cstate.c @@ -678,6 +678,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates), X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &icx_cstates), X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &icx_cstates), + X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_X, &icx_cstates), + X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_D, &icx_cstates), X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates), X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),