From patchwork Mon Oct 31 15:41:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 13290 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2384746wru; Mon, 31 Oct 2022 08:44:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4u/D46lPHMm6JjbFdhLF8hZjOqItkT2Ki8GvD3GTjRUI2ZGdt9yx9+4PaZmshCkT15Sso/ X-Received: by 2002:a05:6402:22f1:b0:462:f6eb:6c6b with SMTP id dn17-20020a05640222f100b00462f6eb6c6bmr13665315edb.365.1667231055396; Mon, 31 Oct 2022 08:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667231055; cv=none; d=google.com; s=arc-20160816; b=om6zTiyLOSqfxmyzENyFwn52IiqMedW8TlWRmjFDQYAt2cujlIagiiTRT8WLUAZNeY S5qSVbB9aj77cN22/1oXOdET3nH0F2DCRbAtHCz4+jAkNQycSHbl+i1N3/8CdtPKF1IF voflQkW10GBraHzvswQ7+god97HD0IebgGlSpuKhM8Q/3QfUq41PfeTwm0DK8S29SgI9 94oRMXTfoDgyOCzs5JquX82CxIG3SM6FrHp+go9eIymFwefnz4bIEKJbxPEYc1vUb5Ms vQb3s4bdi0KtiXaByZcBUTmB3JjSMrhy6/udcYN5d2H4LKYsuGHSeeRzV4irOrnMT86v Cxbg== 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=6bv7SxIn49fBU7HEh7NVV3pa9xYukdCmyvp+A6tDu2w=; b=YiTiDFdhiUx87rGZeou80CeIUDnD9UUh8soDZ2g44xe40H2gkWuKMPdN4eRFK3ECQH KQy+jzXnnTOKEcqnDTTm5ZRg0dZkrP3yNHptNOEpYTr6mRo9y3LElBvvAeBUeRwluKa+ xsHhhu1jmLeH8vjbv/vv9zy0bRCF8TK/XGkiorxEgLlSCHm8df7+pM5COfBSkHvdxqYJ 5glD2YG3L9rknFNbVTmY2FvIqPojtjHSiBNgTFCI2rppXQhSfyEJl6QoC28ggSYy1o/j /rg58AfEW336OYAtpkPAs0v12t26vfcfd8LrXIICf9Fhr73x/GkepOlhO1ZEjHjl0ABm Hwcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IABGZuba; 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 b5-20020a056402084500b004637f0abb77si2825761edz.487.2022.10.31.08.43.28; Mon, 31 Oct 2022 08:44:15 -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=IABGZuba; 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 S229826AbiJaPl4 (ORCPT + 99 others); Mon, 31 Oct 2022 11:41:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231638AbiJaPlx (ORCPT ); Mon, 31 Oct 2022 11:41:53 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49A236598; Mon, 31 Oct 2022 08:41: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=1667230912; x=1698766912; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=68I6eDd/kFkeEi9Qy+k/XReDJcYVdmk7+tcPhvWo6hM=; b=IABGZubaNIMNPpmEpkjE+cMhDyp51rbMRXjQJa6LVhCZDFmvchoXUssZ xSlfUZElDBg7pYSXiHL/79bxCPpKcvPnlOH2+bKHAVrIoAd6r+C8p4IMK uJg4PVI+guxb9uCn7N9R0meO+YibIuGryEokykbuwDEPDS9HaxuVdKEAM bYkZL5v1zhoiEJRsSdNayNuDtvk/mBOr5xdVtApXXhkok7gkiVcF+dDjy DbPXzg9rHIBYSKWG2dSgFiwY5t5wZQrAVIz1cL8VcB4woGNvutdNkdwGE rAb2tBVhtkhXXl8tAiS+lepJQj3lDIaCTuMIYqWpa0plBWRbioI61UM9R w==; X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="306546323" X-IronPort-AV: E=Sophos;i="5.95,228,1661842800"; d="scan'208";a="306546323" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2022 08:41:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="633568904" X-IronPort-AV: E=Sophos;i="5.95,228,1661842800"; d="scan'208";a="633568904" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by orsmga002.jf.intel.com with ESMTP; 31 Oct 2022 08:41:23 -0700 From: kan.liang@linux.intel.com To: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: eranian@google.com, namhyung@kernel.org, ak@linux.intel.com, Kan Liang , Jannis Klinkenberg , stable@vger.kernel.org Subject: [PATCH 1/2] perf/x86/intel: Fix pebs event constraints for ICL Date: Mon, 31 Oct 2022 08:41:18 -0700 Message-Id: <20221031154119.571386-1-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,UPPERCASE_50_75 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?1748218471355933590?= X-GMAIL-MSGID: =?utf-8?q?1748218471355933590?= From: Kan Liang According to the latest event list, update the MEM_INST_RETIRED events which support the DataLA facility. Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support") Reported-by: Jannis Klinkenberg Signed-off-by: Kan Liang Cc: stable@vger.kernel.org --- arch/x86/events/intel/ds.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index f141cc7b8847..26323fea3a65 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -982,8 +982,13 @@ struct event_constraint intel_icl_pebs_event_constraints[] = { INTEL_FLAGS_UEVENT_CONSTRAINT(0x0400, 0x800000000ULL), /* SLOTS */ INTEL_PLD_CONSTRAINT(0x1cd, 0xff), /* MEM_TRANS_RETIRED.LOAD_LATENCY */ - INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x1d0, 0xf), /* MEM_INST_RETIRED.LOAD */ - INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x2d0, 0xf), /* MEM_INST_RETIRED.STORE */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x11d0, 0xf), /* MEM_INST_RETIRED.STLB_MISS_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x12d0, 0xf), /* MEM_INST_RETIRED.STLB_MISS_STORES */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x21d0, 0xf), /* MEM_INST_RETIRED.LOCK_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x41d0, 0xf), /* MEM_INST_RETIRED.SPLIT_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x42d0, 0xf), /* MEM_INST_RETIRED.SPLIT_STORES */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x81d0, 0xf), /* MEM_INST_RETIRED.ALL_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x82d0, 0xf), /* MEM_INST_RETIRED.ALL_STORES */ INTEL_FLAGS_EVENT_CONSTRAINT_DATALA_LD_RANGE(0xd1, 0xd4, 0xf), /* MEM_LOAD_*_RETIRED.* */ From patchwork Mon Oct 31 15:41:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liang, Kan" X-Patchwork-Id: 13291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2384777wru; Mon, 31 Oct 2022 08:44:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5bVl6tHHTL9vberRgw/fn3UnQ7UEZPmQaOUyQo2Q5rfcZ0dAI9Xozyko1gf4lNM2k39x7M X-Received: by 2002:a17:907:a07a:b0:7ad:88f8:7ed9 with SMTP id ia26-20020a170907a07a00b007ad88f87ed9mr13036754ejc.579.1667231060520; Mon, 31 Oct 2022 08:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667231060; cv=none; d=google.com; s=arc-20160816; b=JQAFy6or/A7vFxexx5v2MKmKGQNd1CarJMRH3qRQASsm642fTNrWcDgmPuAd6Y+FlA v0eG0xD2C83N3JLvyhxXd+Q8vhSPfm7+SLCAXFrPIG6BqXUJu9ZiB2/JcbWzv82+DCJw ZefJ2iWcezxWIGZA7Dq5nLsRlJLAs7EkN+dDtG8iBVgne3HXEpPRJyRdVKxsUTRcRRLN pghWmJ0lxdh5+snZhpo5X2MteAgr7Nl0+wKM/HJkNef6WWl588SNuR8eTkolXE2AhMH7 nTYwDZvMwmu8SMsx54xxw5MERnlr60mmBYBtm/Bkh+7GxwL6RizLAmdI2HMioUKxDR79 UJAg== 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=Kq+hC1AS62PiDOaLktoZy93BYDVWEKCzwGoYNhJJy9A=; b=hcjN6ELsAF3jmvJz+9DV0evqxc/axvv5KUonGpELM3wIFpjG8Jlm4rdAy56NpyqmPx Jcr9ggiGzyw56q6a73IrVKnYm8zbe3q0mVpby9IjU94AhC6vpCHlwztL+rcxlWEo8Oyc T8Kbk9ZtNoyzn3jltJ5F4y5ssdJU7lKsys/GKs7M0GUTF6vGpmSmdyHxJAMjPJ1TkzrA FgiPUv6ptnw0xbdjGucf8bG4cQcD5rNGtPSV5quIHqSxuYp6a/28LLgw6TOG16Pg9Gzw Y5QEbYMzerPIyVXqoozWGUfn2VWTN6zt/iyjjyWiVeTxWkP//FqdZEOTuLmEe0hNb0WE yMSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QF0DhHpJ; 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 j10-20020a05640211ca00b004637e16cfa3si2759123edw.598.2022.10.31.08.43.55; Mon, 31 Oct 2022 08:44:20 -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=QF0DhHpJ; 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 S231878AbiJaPl7 (ORCPT + 99 others); Mon, 31 Oct 2022 11:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbiJaPly (ORCPT ); Mon, 31 Oct 2022 11:41:54 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA65811A33; Mon, 31 Oct 2022 08:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667230913; x=1698766913; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fTYm3rkOP9dWwuKYIR/Bm8FEaxFo518yuML15faWha4=; b=QF0DhHpJHJzafuYXn9rF2lOpFwvOnonihkt/Sbak8fms9lMLbSNsBLIi 6GYZF0a4KAsNt94LAw+VmvI4L7VuYtUgRG8EgT9sNjyd03HzG2FwQ2all m2RWPQtvCgdlXeoDw46Htm8EtRx5sZneh7DWGwtDRDQqrkn0Fg/7yeQLp B0JYgFix52oM9gjaxtKTikrCPWWpsk6LOl144nWlyJQcSD4sREqsZ2Iwn v10Q4wGOM7YOCOqKBuZjh720wOGGqI4jNeA/HYu88Zsa9v6Q26u675Gm/ sRbvHy+5nVjrXoEuSLdRySpV+yMD2KaK93xcbmBKsu86qcOIaAAztLDau w==; X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="306546328" X-IronPort-AV: E=Sophos;i="5.95,228,1661842800"; d="scan'208";a="306546328" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2022 08:41:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="633568906" X-IronPort-AV: E=Sophos;i="5.95,228,1661842800"; d="scan'208";a="633568906" Received: from kanliang-dev.jf.intel.com ([10.165.154.102]) by orsmga002.jf.intel.com with ESMTP; 31 Oct 2022 08:41:24 -0700 From: kan.liang@linux.intel.com To: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: eranian@google.com, namhyung@kernel.org, ak@linux.intel.com, Kan Liang , stable@vger.kernel.org Subject: [PATCH 2/2] perf/x86/intel: Fix pebs event constraints for SPR Date: Mon, 31 Oct 2022 08:41:19 -0700 Message-Id: <20221031154119.571386-2-kan.liang@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221031154119.571386-1-kan.liang@linux.intel.com> References: <20221031154119.571386-1-kan.liang@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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?1748218476662366948?= X-GMAIL-MSGID: =?utf-8?q?1748218476662366948?= From: Kan Liang According to the latest event list, update the MEM_INST_RETIRED events which support the DataLA facility for SPR. Fixes: 61b985e3e775 ("perf/x86/intel: Add perf core PMU support for Sapphire Rapids") Signed-off-by: Kan Liang Cc: stable@vger.kernel.org --- arch/x86/events/intel/ds.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index 26323fea3a65..88e58b6ee73c 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -1009,8 +1009,13 @@ struct event_constraint intel_spr_pebs_event_constraints[] = { INTEL_FLAGS_EVENT_CONSTRAINT(0xc0, 0xfe), INTEL_PLD_CONSTRAINT(0x1cd, 0xfe), INTEL_PSD_CONSTRAINT(0x2cd, 0x1), - INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x1d0, 0xf), - INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x2d0, 0xf), + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x11d0, 0xf), /* MEM_INST_RETIRED.STLB_MISS_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x12d0, 0xf), /* MEM_INST_RETIRED.STLB_MISS_STORES */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x21d0, 0xf), /* MEM_INST_RETIRED.LOCK_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x41d0, 0xf), /* MEM_INST_RETIRED.SPLIT_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x42d0, 0xf), /* MEM_INST_RETIRED.SPLIT_STORES */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_LD(0x81d0, 0xf), /* MEM_INST_RETIRED.ALL_LOADS */ + INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_ST(0x82d0, 0xf), /* MEM_INST_RETIRED.ALL_STORES */ INTEL_FLAGS_EVENT_CONSTRAINT_DATALA_LD_RANGE(0xd1, 0xd4, 0xf),