From patchwork Wed Jan 4 14:58:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 38963 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5184241wrt; Wed, 4 Jan 2023 06:54:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXu3z/ZRymFBokLI13N91CzwAismHM3mQg8nIsyu7wTLqMtShajE5RQY1ryVocN30DvnA6ck X-Received: by 2002:a17:906:380e:b0:7c0:be5d:59a9 with SMTP id v14-20020a170906380e00b007c0be5d59a9mr44859339ejc.20.1672844051826; Wed, 04 Jan 2023 06:54:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672844051; cv=none; d=google.com; s=arc-20160816; b=VoRlFDQcdX1aHANZndFY+yYilCfTZvcaF9GzGVMBQ4LbdE32mj/lDWl/G0uhpn15LJ 2bbz9XJJGUgJ55v8xWaWJC+Ipl457ulyeGYbMh5pxRqTYxpv1B5wahYxoPWqOqBeAQYs zznYNtQi2hyMQb1fK8HGyqLb3dcB6uvNYl3rj9mJnKfOxPg4FEX4kHmweTTA5U9DKfuv yoRwg/c3c6Gn1gQdcV41u39Mv2FSS0rJQolWzSWDGcXxUyk4W3Qf6NZFKvaxebM8plBo UXXQGaIx5nrpaNROdG1pGNx+x564zNw0GzACIY0MiA17M2J6fOEJ0BVVTMRkOjfZSltv OzqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=qHCIInuoiebJdiHNe5lWy30uKeIbsxSvoli0jaiLut4=; b=xoi/pmRMUHoPrmzWyuEv6jwczejgWAkZjDC7WbQFv338u2YDgoEolhsCuLsfNHWOZy 3ksisKJU1LRB+2CtIxcJY5IG5Zb50fH9CBGoA+aEDOWLz3+Hci9OGGjo1fB8jkDbIrXy u4f/wkLAbSLpFg6+smiGkA4ZU34ZebFNsQsO4Oi4IjGRBbAU6Jhg3GdvSdCIPk2EbI8b R0MpyyH24nSjR8RZZylphI8HQ8OJGzdTRvtm01wt7IpdRXc5Z7Zv+vaF5fse71ZReU+t wu1XBvuumqStV2Uc1PNXkf3Ru9JNZV3DfiAVay2gyRcCwDe5xdFu/6Z7EEHhZCCtWYK5 gVIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gVkd1pFh; 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 g9-20020a1709065d0900b0084073ce3aacsi30690099ejt.578.2023.01.04.06.53.47; Wed, 04 Jan 2023 06:54:11 -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=gVkd1pFh; 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 S239489AbjADOwV (ORCPT + 99 others); Wed, 4 Jan 2023 09:52:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239483AbjADOwE (ORCPT ); Wed, 4 Jan 2023 09:52:04 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C38F2BD9; Wed, 4 Jan 2023 06:52:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672843922; x=1704379922; h=from:to:cc:subject:date:message-id; bh=IVgAP0seJkcpaaiACVAxhGwC/VqyuQOB1oJYl2epNdU=; b=gVkd1pFhtM8uVIxGKWYaGB5l7jCQT+KcUzZHUoIyZI17jtqSQ4DZQKvY Y+EV1PAJwPqIRiGUV0URbkpXXHfh+OR36+ke/S4Mr4qc+tR/P4iFRVYhs mV0AE7xcFa6ipGdgHb4/gar9PQHyYMhI9zeRMlbjYjwu0cKiWXPoJkNXt oU0k1fQwWwd7zTPf5yVnstEAuIU3hHKWAsLwLFesLZk6ECtCKxChzJDmd vE6WDsQ+KbsT1E0vc7dw7xj7P8VNp+u9LQbvwjXbTxfquRRaI4BUhplUk Y1R1rmJoXHYVmppFuutC+6FOyejnY0E3P7zpscuS4n0SwyBnA2DdB1xjA g==; X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="384240207" X-IronPort-AV: E=Sophos;i="5.96,300,1665471600"; d="scan'208";a="384240207" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2023 06:51:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="900575818" X-IronPort-AV: E=Sophos;i="5.96,300,1665471600"; d="scan'208";a="900575818" Received: from power-sh.sh.intel.com ([10.239.183.7]) by fmsmga006.fm.intel.com with ESMTP; 04 Jan 2023 06:51:35 -0800 From: Zhang Rui To: peterz@infradead.org Cc: mingo@redhat.com, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@linux.intel.com Subject: [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake Date: Wed, 4 Jan 2023 22:58:30 +0800 Message-Id: <20230104145831.25498-1-rui.zhang@intel.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1754104124576531871?= X-GMAIL-MSGID: =?utf-8?q?1754104124576531871?= Meteor Lake RAPL support is the same as previous Sky Lake. Add Meteor Lake model for RAPL. Signed-off-by: Zhang Rui --- arch/x86/events/rapl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c index a829492bca4c..0ef255602aa8 100644 --- a/arch/x86/events/rapl.c +++ b/arch/x86/events/rapl.c @@ -807,6 +807,8 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, &model_skl), + X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE, &model_skl), + X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, &model_skl), {}, }; MODULE_DEVICE_TABLE(x86cpu, rapl_model_match); From patchwork Wed Jan 4 14:58:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 38962 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5184098wrt; Wed, 4 Jan 2023 06:53:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXvHUJiyAgLhpKzHIkA/IU7v4xLathQtd9ojmJ128H9e1yFiYgYgqc2tILOYb3ccQmdgcodA X-Received: by 2002:a17:902:7087:b0:189:101d:9bad with SMTP id z7-20020a170902708700b00189101d9badmr46817461plk.59.1672844036329; Wed, 04 Jan 2023 06:53:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672844036; cv=none; d=google.com; s=arc-20160816; b=wYY6sjE136bzX616kIxQ+fMHkUZIjjU9ULoXzU4K2VuRXYNJbK3P9WaDmLEqtCRTRm knZkG3ulg+XjNXum7ZKRGxhMIF4uOOYF5vFmejV+Bdw23awW4E4SomZN+p9xx3sZ/XaS DfpIrWfX9Bm+WWTrU5DI0on8LEmWr5yypDHJN5GARzSspDn/0+8xvH6093eJaPPYHcRz SZMW1vMoY48lfAzXi7sB80P/GdTASE70L+CXhKvEx+S29FOlTKtUI433qiH7a+0OVvye AmaTLIR0re2Jz2Z3cAjTxUxAbv1w6N6YmWdzdGUnVvfEDGx4NJ+6HCaJoQDv3U/iHu5H gvNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=zRjOLdcCwIunz5VOOtizWWSWROLbcT0vxIQJdG3XU+4=; b=B8KSWSaYHSFo8UkRzVhDhhvG6/7yV2x00wo8Kn/Q/MjqMWraXMEbsL+RAsIScudehI h4Wtzfx9YKWy8pdQ933yyT0A2W9qJBIaDxdYG/qT104Cutka3EKn0WkkgIRs2nD2+PIg Ekcq0k+Z4rC2aRtOop4NylFHPdGipqzwuXq88z+/uzODgAg5V5/U1VHyrxDVrru/jLRB waxQFJt+OGpvSNBN3d6zu7zOfVk0Dn3rvT7TosBBpnMGwQsAkG3yWiZIr/lczxM9TIuM uhALg9OEtlNX6cNAJWOBJsBmJ7zJ9ylYzsOSRoxa/3c1ArdRWl2x1pK0zB4ScR4X+p/B P/JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AQvL8bPO; 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 f4-20020a170902860400b00189b7f50e78si2905449plo.134.2023.01.04.06.53.42; Wed, 04 Jan 2023 06:53:56 -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=AQvL8bPO; 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 S235094AbjADOwM (ORCPT + 99 others); Wed, 4 Jan 2023 09:52:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239498AbjADOwE (ORCPT ); Wed, 4 Jan 2023 09:52:04 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D3B66478; Wed, 4 Jan 2023 06:52:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672843924; x=1704379924; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=elel7+bS3L05dbWw4U9vGK7LSsvQ2mQBav5PivsMYGo=; b=AQvL8bPO2AGewMyQefoysKq8DALbGGbyLOfPYpxf28Vsc5sSoIUOuZwM f+ejdKiLt6QiMN/tkV3IGRkW7FdO12TXm1JTUn5z70G1EjMPnxr5+Fjk4 VGUuTqHixn7wlbeLSU1j7/fzbNg8Mguo/XYGfDA1q3bBdFHtawkW41yEa nJA+cR1sV9lz+V/gifWqrqnUT2ZSD2fuHEU6siYsfJRcwBHdtXzcPt7w5 m+e0q3sXB7pC9LXSIvbkL9ehiMjLECm3c8DTBSxcCyyfA3TodWUsUqUnW vJz0K3GjZ8S2OeopWiFrgrf7FM5z2b0jBVUq4tnR0YbSvewcd2+lhD1dx Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="384240228" X-IronPort-AV: E=Sophos;i="5.96,300,1665471600"; d="scan'208";a="384240228" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2023 06:51:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="900575821" X-IronPort-AV: E=Sophos;i="5.96,300,1665471600"; d="scan'208";a="900575821" Received: from power-sh.sh.intel.com ([10.239.183.7]) by fmsmga006.fm.intel.com with ESMTP; 04 Jan 2023 06:51:38 -0800 From: Zhang Rui To: peterz@infradead.org Cc: mingo@redhat.com, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@linux.intel.com Subject: [PATCH 2/2] perf/x86/rapl: Add support for Intel Emerald Rapids Date: Wed, 4 Jan 2023 22:58:31 +0800 Message-Id: <20230104145831.25498-2-rui.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230104145831.25498-1-rui.zhang@intel.com> References: <20230104145831.25498-1-rui.zhang@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1754104108132359748?= X-GMAIL-MSGID: =?utf-8?q?1754104108132359748?= Emerald Rapids RAPL support is the same as previous Sapphire Rapids. Add Emerald Rapids model for RAPL. Signed-off-by: Zhang Rui --- arch/x86/events/rapl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c index 0ef255602aa8..8ccf4a36e386 100644 --- a/arch/x86/events/rapl.c +++ b/arch/x86/events/rapl.c @@ -804,6 +804,7 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &model_spr), + X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &model_spr), X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, &model_skl),