From patchwork Tue Mar 14 17:00:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 69736 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1881778wrd; Tue, 14 Mar 2023 10:15:46 -0700 (PDT) X-Google-Smtp-Source: AK7set8oC/qlqSS+AYYqqqJOGfBJ4+o5rozxJyBuP6PJJolMw+l3HuSfWlzZ+lvQh9GD76LMEfPu X-Received: by 2002:a05:6a20:8427:b0:cc:70df:ae20 with SMTP id c39-20020a056a20842700b000cc70dfae20mr16214986pzd.0.1678814146224; Tue, 14 Mar 2023 10:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678814146; cv=none; d=google.com; s=arc-20160816; b=LXC5vBwOvLqSTyktZN/EUcYiRktzZ1+ZM0BPE/MBtUvDtJRxuxJ16EnANR7cApCCmd 5fKkYFArrCDk+pISfgpoqAHmrrbLggD8pRa4xzsh83P/xdqR54QJD/7q1gmCPvcdZ9Qm yn/fezHpyiQOtAMrLQqau4gYZ2Xxp0SwrlNG8dQ6aizNpKfqve7j7bhsTsd5VW4waJJw OMLIOKzKksI9zrTUOGKhWo+ghVCvRfyDm04qy2q+zxYoUGr8Awen7DtT4eq504VqCh79 TXpXIwJxcfpTVsHy/H+QwFYXkjKvHpv/nZIzMvsY2dtkoJzQCfY8STYRHyrf4Q1pmn9M uWFA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=09RpQVjfGzjHc9UqX+GB3cCiIR+Q0KK19dISeUHB/Mw=; b=LTZuwBnXwibGMSChBF6dst7mbsxgucm8TbE6eVulHi7SjBq0MIZm6Q0GmiCpLoYOTi CbA0ZUAWBYxdA+nPQawDqiXWjFpu3+JIYvoE1Qpj1kJKkhoH0o8hvlXk5Uk99OB0EfKI tEactZgc7jcrS9JqXUdX7aPUYq37Hjgho/jGzFrfM45hKd25Waa+/AGYmQacA1I4XP7+ 2K1QZmMTeU4dd8hT4e03kYMTY18JgWtLmOA1Boq9AfD3HMhpu77pY51UdZ6vaclXrJgf uW13Tp8ycVd7Xr03WExtz3PCcBxnHLP3uBuBVDK4AkiX/87TXhhdPuP9JFF2ockVaZZ5 gieQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aaqW4WYk; 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 z11-20020a6552cb000000b0050300b179f3si2446005pgp.444.2023.03.14.10.15.30; Tue, 14 Mar 2023 10:15:46 -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=aaqW4WYk; 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 S230162AbjCNRAs (ORCPT + 99 others); Tue, 14 Mar 2023 13:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjCNRAq (ORCPT ); Tue, 14 Mar 2023 13:00:46 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14363A6BCB for ; Tue, 14 Mar 2023 10:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678813245; x=1710349245; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WOjIVoQLH5wDjezKUxOWulHf4jcxXSq96FWo+jaGnJg=; b=aaqW4WYkkVm2ZiJ+p4uo3GARj+HnmwVUEJHXAny82qNA2UkfvpkPijDv oyexYLpqzxLbSo7g7qXcBYc2EI7FEZ2nduEUWPAr6v84WWLYTEaqLjVEa /fwQ1tmHzZjnCl62CK9F14PSFQWKkB3FXJ8kWoe0h32qf5zeSM71y0gbD hn0r7Td4wB5yYiQmERlbWwTP/tUoR5KUGBjReX1uPbvP0B0bC0RGDv0Ux u4ABq5/p5YSdGTOGrOmyeT/vSZNtWwI8gmhjnDq3Y7sqOLWCEPZjU8Dip 29AwbzMVnQ51JYDIOEpJiOjyUyOcuBH2mV+LhFo/P+cYg9O27hwebH1Ea w==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="334971141" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="334971141" 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:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="743379727" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="743379727" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga008.fm.intel.com with ESMTP; 14 Mar 2023 10:00:44 -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, Kan Liang Subject: [PATCH 1/3] perf/x86/intel: Add Granite Rapids Date: Tue, 14 Mar 2023 10:00:39 -0700 Message-Id: <20230314170041.2967712-1-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 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?1760364222258224349?= X-GMAIL-MSGID: =?utf-8?q?1760364222258224349?= From: Kan Liang From core PMU's perspective, Granite Rapids is similar to the Sapphire Rapids. The key differences include: - Doesn't need the AUX event workaround for the mem load event. (Implement in this patch). - Support Retire Latency (Has been implemented in the commit c87a31093c70 ("perf/x86: Support Retire Latency")) - The event list, which will be supported in the perf tool later. Signed-off-by: Kan Liang --- arch/x86/events/intel/core.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index a3fb996a86a1..070cc4ef2672 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -5469,6 +5469,15 @@ pebs_is_visible(struct kobject *kobj, struct attribute *attr, int i) return x86_pmu.pebs ? attr->mode : 0; } +static umode_t +mem_is_visible(struct kobject *kobj, struct attribute *attr, int i) +{ + if (attr == &event_attr_mem_ld_aux.attr.attr) + return x86_pmu.flags & PMU_FL_MEM_LOADS_AUX ? attr->mode : 0; + + return pebs_is_visible(kobj, attr, i); +} + static umode_t lbr_is_visible(struct kobject *kobj, struct attribute *attr, int i) { @@ -5496,7 +5505,7 @@ static struct attribute_group group_events_td = { static struct attribute_group group_events_mem = { .name = "events", - .is_visible = pebs_is_visible, + .is_visible = mem_is_visible, }; static struct attribute_group group_events_tsx = { @@ -6486,6 +6495,10 @@ __init int intel_pmu_init(void) case INTEL_FAM6_SAPPHIRERAPIDS_X: case INTEL_FAM6_EMERALDRAPIDS_X: + x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX; + fallthrough; + case INTEL_FAM6_GRANITERAPIDS_X: + case INTEL_FAM6_GRANITERAPIDS_D: pmem = true; x86_pmu.late_ack = true; memcpy(hw_cache_event_ids, spr_hw_cache_event_ids, sizeof(hw_cache_event_ids)); @@ -6502,7 +6515,6 @@ __init int intel_pmu_init(void) x86_pmu.flags |= PMU_FL_HAS_RSP_1; x86_pmu.flags |= PMU_FL_NO_HT_SHARING; x86_pmu.flags |= PMU_FL_INSTR_LATENCY; - x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX; x86_pmu.hw_config = hsw_hw_config; x86_pmu.get_event_constraints = spr_get_event_constraints; From patchwork Tue Mar 14 17:00:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 69739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1884841wrd; Tue, 14 Mar 2023 10:21:26 -0700 (PDT) X-Google-Smtp-Source: AK7set+VnzzKEiry8Tug68eINWFSPglv02oT8x0unsHv1nn/LIwZyJez5igBqbbZQlja78M6iKFp X-Received: by 2002:a17:902:ea0e:b0:19c:d663:a31b with SMTP id s14-20020a170902ea0e00b0019cd663a31bmr46305900plg.24.1678814486709; Tue, 14 Mar 2023 10:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678814486; cv=none; d=google.com; s=arc-20160816; b=NnqZgEzhMgaq8XWL0UjFQ572/V69TvOdgdhwfo6oHzvT70w7HVmqoyajBxM+9HvV2k cyCS955Dp2+fcBmErJwC3o4o9IbIAAyZA7SK2drHITwQEyLPJd0XEQ9dhekEzRO+Hs80 dKXhFJQa/W08d/2O4a4Tr5H9bxMKPk3Wy7hhdwwkR+ewIFIP/XY8MpFYq9z1K0uCEci9 EqV4WeBGOuMPuRszg84RkcZ3qNipfUM53Gph2r+0htKTT5UHiq9g6F4RtBzPOdciiFSD GgW6bumch7EXYSD5vA2ZJsrwgAvjMlrLL0aLf66dXn943qBHlpXMNkEV1zGLLrOOhkhB J1mg== 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=4MrePtmhscOpEeMeNH8Nl5wd338b6LWQJR8qyazwqCY=; b=XE+5platvQHeW7zDespFkH+TiZhlu8II7V7QlLgu4W0/cbTzBJtEOiSj8wN/ey1MMh bmz94pMgRHkM9ssz/3H34yhHLaMCPzgHCclFNOlnhk/WSb9rx+wEwp3zwfKJ4u2728XV /UleV33xbX0Y4aR0gBL0ZCqtcvH0Hzqsq21/a6K4YJznSkTrzICNNfZTP1S8Mv/hfNPH 11itJFDGmtDPHqa6rynVeF+M8Zodv5elUtS6hAs51nayfh/ZtnWE9dDPsUVKo+gujdVs PceUD6HLPQGcewkNW+XaI+osgnWotRZokPJQO/Vg7hl02Jutrhthx65YEocgTV8RlnUS b0xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c4HO4Mv2; 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 v3-20020a1709029a0300b0019ca7a76d68si2884693plp.67.2023.03.14.10.21.09; Tue, 14 Mar 2023 10:21:26 -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=c4HO4Mv2; 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 S230326AbjCNRAu (ORCPT + 99 others); Tue, 14 Mar 2023 13:00:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjCNRAq (ORCPT ); Tue, 14 Mar 2023 13:00:46 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FC4DA3B45 for ; Tue, 14 Mar 2023 10:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678813246; x=1710349246; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bYdoEF0T5KfS1k21zUnAfoLcc7e+zGI8vdSjppzEaNE=; b=c4HO4Mv2aWwyv1BWwAJziL7a6MFgmK/6VRsQmcO7s84z2uA2sHu/AEmT PNH8a1MJNR7NVVlnaLVXPlAzLIjZZzplkXfWo2lNKJpesd4mvHmCZP/jR k01th1OFcjHeBfFW87sOMyvGmArMLZFAfdeuUni++urvujoRYZPv6B8WD URf7SjquKXOYES2mo8s8hz9JuL4r2SqDrAkTyw2Jl27WRKn+auxwCxR1j jEeD6btJlsb9AYhg++lkWFjI6pYzO2CRVwLX1zKr5/TYnXNTVkIqWPhyc aNQSwiFq6aFizRVg/oRatl3ZdKkPgPBKIPhekiyNpyeWBez+W05kEV9hy Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="334971158" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="334971158" 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:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="743379730" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="743379730" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga008.fm.intel.com with ESMTP; 14 Mar 2023 10:00:45 -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, Kan Liang Subject: [PATCH 2/3] perf/x86/msr: Add Granite Rapids Date: Tue, 14 Mar 2023 10:00:40 -0700 Message-Id: <20230314170041.2967712-2-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?1760364579402906905?= X-GMAIL-MSGID: =?utf-8?q?1760364579402906905?= From: Kan Liang The same as Sapphire Rapids, the SMI_COUNT MSR is also supported on Granite Rapids. Add Granite Rapids model. Signed-off-by: Kan Liang --- arch/x86/events/msr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/events/msr.c b/arch/x86/events/msr.c index c65d8906cbcf..0feaaa571303 100644 --- a/arch/x86/events/msr.c +++ b/arch/x86/events/msr.c @@ -70,6 +70,8 @@ static bool test_intel(int idx, void *data) case INTEL_FAM6_BROADWELL_X: case INTEL_FAM6_SAPPHIRERAPIDS_X: case INTEL_FAM6_EMERALDRAPIDS_X: + case INTEL_FAM6_GRANITERAPIDS_X: + case INTEL_FAM6_GRANITERAPIDS_D: case INTEL_FAM6_ATOM_SILVERMONT: case INTEL_FAM6_ATOM_SILVERMONT_D: 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),