From patchwork Sun Oct 23 12:51:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 8010 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1603277wrr; Sun, 23 Oct 2022 05:57:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6C4g6lriut8PKQSzfgTa328PwpOjTmk5X70qpJA9FzKFshiz/onzXdJLV9lTcD6Jy9WtEl X-Received: by 2002:a17:907:724c:b0:791:a7ff:aa7a with SMTP id ds12-20020a170907724c00b00791a7ffaa7amr19573517ejc.105.1666529872791; Sun, 23 Oct 2022 05:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666529872; cv=none; d=google.com; s=arc-20160816; b=tlu0yoZThoDw/8zOV7ukvn3m95WJRKany0CVInxtVDW/o70E7xC2qb991mPXcTD02Z LRkdb9hQd6ZUShkIZA4Eu3/DS8I0qs4k0e3or3U8tt+ByaBDh/hHv5LVoer2WVu7/4ZS FFBYwWreVwJadVGSGqEas5UXSBNMfPgCvTKdeH9B8Qrpu1Lu2Ohwk/Ao9kxwwqjTTu20 d5pBZTDwnh+Cf2azUJ5nLN+bjMd2p2oVbjK+BJfnSFa6pHu3KDbOS1CHsKdqoB5+nwBP x6nukFxtNKhli76ihUdHQk6TRJZa038LKQNRpH6Uv0gHYl20hnVKFSRmG8VD8g/zhoZn 9Ywg== 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=xqsFxYxj3SNEKFrsOqKiCK/SvpXQQGvH8J7XQ3yeYLc=; b=yGfNd2I/MPfyeNeorle5hPveJo5T/TpKUUKRQ9+8UC2Dx4fDNRss17nQjo5RzP1odA wGLMezdihMlXbSDXvD/hiseQ8JSyEfBsRImXJ2XX72435Ep201bWHY5T/0yh+8vmdKu+ FjVuY6/bd4bsgncGiv1lxMXHFzr9Wj7VeBB7k8Qv32kLH1BCdvOnPhzn+557eV5SNKlk hYOE33obiEsavoqm317vX7Pv3Sssafwl3V+dihTWVSzPhG9KK6DIKPs/1KsI1JleyraA cKsJlM382Nxz0srdKTZHytqMFZKqC72xxmPzMB0OnpvPQqh6H8iF7KzT6vyWMzSooOAZ NmTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EfCgMhm1; 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 qw22-20020a1709066a1600b0078dcf11ccf7si24550727ejc.802.2022.10.23.05.57.28; Sun, 23 Oct 2022 05:57:52 -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=EfCgMhm1; 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 S230307AbiJWMtN (ORCPT + 99 others); Sun, 23 Oct 2022 08:49:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbiJWMtB (ORCPT ); Sun, 23 Oct 2022 08:49:01 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2786475383; Sun, 23 Oct 2022 05:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666529332; x=1698065332; h=from:to:cc:subject:date:message-id; bh=EBDEp9fMFhSMNQl9t4zJ05KU6qeNGLZnGb/t5yOcmfY=; b=EfCgMhm1c6P+bf7gvhukjz/GLK+iSsN/2nUlRcN55x9MbFa9AZwhVD3J htFTvpLQDkOPWUFlbx/qNlubcJJjIeih0LFdyINFxZLV763NVY7kaOKVD QLgxLPBZaVP6FjrqpPXHNqdyJ2LsOjzEjhEI2KzT9jDxME37cqpPDVy9r nfhEDYn56lAb1aYhTCEfmgrlT9S5WZ7H8FDWvkNsZ6cxMZaYl/zejA5cx f6a4V+4TGmcUoS+d7JRRBFN4CcmOTIz+uirAQ+sywx9uNY1P3M+VASnXO ubZWDEjYYfrWSR+DMtcNraMbyC6AnmW5/X13HUOisTirT5hWgX9soqR3I Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10509"; a="308944499" X-IronPort-AV: E=Sophos;i="5.95,207,1661842800"; d="scan'208";a="308944499" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2022 05:48:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10509"; a="756303919" X-IronPort-AV: E=Sophos;i="5.95,207,1661842800"; d="scan'208";a="756303919" Received: from power-sh.sh.intel.com ([10.239.183.122]) by orsmga004.jf.intel.com with ESMTP; 23 Oct 2022 05:48:49 -0700 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 AlderLake-N Date: Sun, 23 Oct 2022 20:51:19 +0800 Message-Id: <20221023125120.2727-1-rui.zhang@intel.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-4.9 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?1747483227845350414?= X-GMAIL-MSGID: =?utf-8?q?1747483227845350414?= AlderLake-N RAPL support is the same as previous Sky Lake. Add AlderLake-N model for RAPL. Signed-off-by: Zhang Rui Tested-by: Wang Wendy --- 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 77e3a47af5ad..165c506cd37c 100644 --- a/arch/x86/events/rapl.c +++ b/arch/x86/events/rapl.c @@ -806,6 +806,7 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE, &model_skl), X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &model_skl), 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), {}, }; From patchwork Sun Oct 23 12:51:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 8008 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1602765wrr; Sun, 23 Oct 2022 05:55:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70TNTk9jAl7OTCaK3Qio6uVXjEVDlq4LKJvQRulLQqTpVC+XlcpfcnS74K6hOj+V79dtGR X-Received: by 2002:a05:6402:2804:b0:439:83c2:8be2 with SMTP id h4-20020a056402280400b0043983c28be2mr26685425ede.292.1666529750516; Sun, 23 Oct 2022 05:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666529750; cv=none; d=google.com; s=arc-20160816; b=VtnqV1uC0bAysLfSVhQRlQIkfT6/+f0wsYW2Gx3nYtCW7c7YoIXKu0FLfvmR5ag/mV UwM49MezEvdQDoCog6uzqQZ5DobZS5oH6QHSZSB2Vg/JJon1AqxhQ7VKdokLuBv05zQB o4+UZAehRISTFQFViYhS/hYb7+eCcRY+ywrbrlgIjKwWSw4KkWt319CzlGUOMm2aLQsQ G5/vudsmMblp2gbta4aCQcp9oEWcATfPnznBWM2n+wRlFtsVvfJA5IxXPMciNQWXXMK+ UIoENJFi8tdd3Ywj0PqlJxIV69kyPOBfHXi9/4B2ilNZvmxEsaYpUachB0fXgPgu/fuQ +bJw== 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=czKSc6n+877PjtiZU/IZfJ3PefNn/xHxScoP5hiVVp8=; b=gFwnAAX5yqHsu0yUIGwyUyWI7+fogh3MOGvk+v6NsLRtz31srpfTMgBVsBYqBd+ics zs/f8X1Dk7RHocw1+iAOP496OzW9L+caGoHWhzrZDWoO5YmlEXY97XJVQ45m8kzKuSIj rumazBVv2FCZsN6f81/4offTsD7AHyWOWdrkGV9WdP1HA5We5dEyJWbjNeOEaaW7qhnv kRyF52syiLo+xlh9vkZu4VrI4fUs7SjVFc3B37k8gMlWQ19Elf++TSXq5BbJZjzZXpD7 FujeNWUpm3tfrgu8W6cYc+7/nq/lbFAyQ+N9TPH4qErhztq8wK3swpaglqTwgBTd+BqE YapA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PqUBTylK; 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 ae12-20020a17090725cc00b00783160b16a1si6955635ejc.397.2022.10.23.05.55.21; Sun, 23 Oct 2022 05:55:50 -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=PqUBTylK; 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 S230163AbiJWMtL (ORCPT + 99 others); Sun, 23 Oct 2022 08:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbiJWMtC (ORCPT ); Sun, 23 Oct 2022 08:49:02 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19DDF7538D; Sun, 23 Oct 2022 05:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666529335; x=1698065335; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Wr1wExNIpkZXMw8IkZIKKVQFVsJkOI8UO9dU31zeISw=; b=PqUBTylKQfMX6PM+/LBBI8ckXMPilMyy2UmEBSEPNkwgaL+FeoU/yHRD J02U2e89mjCWAaSqs+8P449uL/MtX2z84F3kq6eY6hx0Vx1RV6Bqi9z7w LO9CIFxw8ce5+kNmBcbHdYtgtJRmbbQOOxDxQ3pReK5hP676Ufu/wKeCX ROqHzjgJZVqv4zD6/sfcaBSgtS1lA4t+mwiC57BAJxoMhPD0WnXrnfb5t S7hh36WjAJSWlfQrYQXXyVtUPRocJ1+lRvstFuZWTqcyZ4ED4xp+jpMlZ IT6DMCp9eKsJkGq3b0ZaoFX7q6ABIHFdq9ccwKpAjY4Td7J5J6wAVw7f+ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10509"; a="308944506" X-IronPort-AV: E=Sophos;i="5.95,207,1661842800"; d="scan'208";a="308944506" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2022 05:48:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10509"; a="756303924" X-IronPort-AV: E=Sophos;i="5.95,207,1661842800"; d="scan'208";a="756303924" Received: from power-sh.sh.intel.com ([10.239.183.122]) by orsmga004.jf.intel.com with ESMTP; 23 Oct 2022 05:48:51 -0700 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 Raptor Lake Date: Sun, 23 Oct 2022 20:51:20 +0800 Message-Id: <20221023125120.2727-2-rui.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221023125120.2727-1-rui.zhang@intel.com> References: <20221023125120.2727-1-rui.zhang@intel.com> X-Spam-Status: No, score=-4.9 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?1747483099326089053?= X-GMAIL-MSGID: =?utf-8?q?1747483099326089053?= Raptor Lake RAPL support is the same as previous Sky Lake. Add Raptor Lake model for RAPL. Signed-off-by: Zhang Rui Tested-by: Wang Wendy --- arch/x86/events/rapl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c index 165c506cd37c..fea544e5842a 100644 --- a/arch/x86/events/rapl.c +++ b/arch/x86/events/rapl.c @@ -808,6 +808,9 @@ 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(RAPTORLAKE, &model_skl), + X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &model_skl), + X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, &model_skl), {}, }; MODULE_DEVICE_TABLE(x86cpu, rapl_model_match);