From patchwork Mon Oct 2 15:03:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 147335 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1496476vqb; Mon, 2 Oct 2023 08:17:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFbe9wiypxCW9vu/JTOX6eMMeEoQeYzwRLuTnI/ncumdGqSFvQg6rfie0GygtsH/RPaC6K X-Received: by 2002:a05:6a21:60f:b0:160:c1b9:a754 with SMTP id ll15-20020a056a21060f00b00160c1b9a754mr9144669pzb.45.1696259838061; Mon, 02 Oct 2023 08:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696259838; cv=none; d=google.com; s=arc-20160816; b=JBNTvY4fR+XlpoGqIwXzx1a2WApNfMlUMm8wqphP0dwf/aKG/KtqcV8S77DJNHCOY0 N+2FCFqYNCQ1iQrvMHSSv3Nt5j+cPazQzZ/4PuP9PA6GXYVQ5tAKBoAPeUZ8/bycr1Ij GUHqfXYNP2wb6kof0MjjM819ZYZ+UmG0R/kUOnnCEOed/T3NWcgVWAdXlgK7zAJV3cIc 78CgRl64zhh+saK7aDys5rUqKFXLFRWfRcKSUzpVnmbbD13ItxZ1Q6vUNFh44dtUGajt iqWr1uveuhtldj/ulB7PjdG2hAs7523ufsdQC7Xh1RMeg0s4a6g3ptq+rFl23Suj3fPl FZYg== 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=V4yI9S8HulQVZe4Oeo4utVuBB+EAWj6ZdTPzEnW1Wp8=; fh=XOkOKN9ZbC1Zh3rfeAvxUpgU00NM1ZcWi06LZ96oE2g=; b=PnCTgfc1ZTA2f62umJA11eJL5gXsgWCipsXAA43/Q3nIdQjwPwDxbtmFOu3ugIpjI2 SfeNE3nfyfmisy4mgVOxL7RpBpqNjc9oEqf4tATRAVbEDEAFdoKjwotiORwRbn0aQvRG pTyvf2zGxEo/0IWIMJuynxJ6M6NqD/cBy6SuCJxJZJZym9AAnWp8GnhJmxlZtfI1OYqK opUF850COEeBGHdu0nFl58YNt1Yaxbru9DIDv2zXIfNl2DgWiS6pnlrmLOA81H0JDh7Q gB1CQ9yonhK74oN3edVOBjVRIO/d+qUj2zi8fR6KLZsyKFgPA4KbyfSbiDHToVf6uYNi 5HoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BkEnaIXe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f20-20020a63f114000000b0056566687e59si26722223pgi.343.2023.10.02.08.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 08:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BkEnaIXe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C7D5780D44C6; Mon, 2 Oct 2023 08:03:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237952AbjJBPDf (ORCPT + 18 others); Mon, 2 Oct 2023 11:03:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237948AbjJBPD2 (ORCPT ); Mon, 2 Oct 2023 11:03:28 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A66FDA7 for ; Mon, 2 Oct 2023 08:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696259003; x=1727795003; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UNfst+AaesJthDfkA5tDAoLeA2ZVgQ7d938xHxoBOl0=; b=BkEnaIXedm4+2Qyy5PWiZtd00QQaq8GxaLfcVjhDJUqFhSuwSW2+0nMX O/JdRAzB5q2OpR7KTUh5VvLGwgZU80yT+Tons8I4gWyOrxhUpLx73cBwv kz1yXunqWyV0QbpnC6CYMod3NrsxOEMr+4dWUc3sit46lxXAtoS4qpsXS r2AEw2zDH8i3EUJ9sF+/1LFCosyJxX0Oc/YoLX7tPYwP3j9lwvQBWAtgo QhuZmNu1wrPJtsurwhuQwdA9wED6RHbrlc0qKyGMBoT1U9vnFbizHzL0Z ye9DvVbftuYL7xundrLKVcg4OO/XBe13yhaZz6oBTRH9vbwmc0OAKyVX/ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="362033057" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="362033057" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 08:03:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="820904670" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="820904670" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by fmsmga004.fm.intel.com with ESMTP; 02 Oct 2023 08:03:20 -0700 From: kan.liang@linux.intel.com To: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: eranian@google.com, ak@linux.intel.com, Kan Liang Subject: [PATCH 5/5] perf/x86/intel/uncore: Support Sierra Forest and Grand Ridge Date: Mon, 2 Oct 2023 08:03:25 -0700 Message-Id: <20231002150325.2025749-5-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20231002150325.2025749-1-kan.liang@linux.intel.com> References: <20231002150325.2025749-1-kan.liang@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 08:03:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778657356018787503 X-GMAIL-MSGID: 1778657356018787503 From: Kan Liang The same as Granite Rapids, the Sierra Forest and Grand Ridge also supports the discovery table feature and the same type of the uncore units. The difference of the available units and counters can be retrieved from the discovery table automatically. Just add the CPU model ID. Signed-off-by: Kan Liang --- arch/x86/events/intel/uncore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c index 01c01cae82ef..4e26a28536de 100644 --- a/arch/x86/events/intel/uncore.c +++ b/arch/x86/events/intel/uncore.c @@ -1877,6 +1877,8 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_D, &gnr_uncore_init), X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &snr_uncore_init), X86_MATCH_INTEL_FAM6_MODEL(ATOM_GRACEMONT, &adl_uncore_init), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT_X, &gnr_uncore_init), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_CRESTMONT, &gnr_uncore_init), {}, }; MODULE_DEVICE_TABLE(x86cpu, intel_uncore_match);