Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1741691rdb; Mon, 9 Oct 2023 00:56:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuuvULhgNe3OAIt3xx44SLA5jvQQjKF3JA1u6qWivgqgLBgLT/ojLrO6iNY9iaUrnZcqEC X-Received: by 2002:a17:90b:4387:b0:270:b961:1c3d with SMTP id in7-20020a17090b438700b00270b9611c3dmr12104535pjb.22.1696838211855; Mon, 09 Oct 2023 00:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696838211; cv=none; d=google.com; s=arc-20160816; b=yjHjZO1S+xrCTV0fIZMfAWytA3wzhATrLXH49FhYIohZIOdKoK89PWR/26K+6ZoYnE y6BxIKbsin7faxlimg27Q5/nQ7RRfTP8gm3V3ayxA/mSDNU+4xyQnIgivACjYirng0uh AHWY5jVTGO/4F3ntCXu/pcL6clwGSoar1H+w5EUwlu2gkWAskgJzWH4w4vyC/XZlFJJ2 J385IcH2+Kibz3v2g9dR1MDj3HPcetRT2ki/1o2RbWi7AznG9jVcjzVRaE6KqvwpVALO 3oKIsVRW1UU7osFAdvIi5MKLBYeSL9wXBwxqCYLBEkEm10lstY0A7h3uHhAj/nYW4IKO sWjQ== 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; bh=2Euc0Cy6PvQw2B+KqcpPmyZ7GYzV6O6i+RlQXU7A1u8=; fh=s03SIMIeJHh4tNM3mw7pRMBjGeQiA04Y7AfUJ3pCpAI=; b=bpH/fYmYi7kSrYFRTBwX+sIs6Qxhvy52pfA6wsxu3h/+XoxrWICee7YYNWmoqm8joG uzJDQHYE9TjEXMGEOxd1c9tjLxXjvRWnmPucggR0YZJLRxUiMGPjlvkOr3M5nbHXQ9E9 JnZOAdSa0i/x7g7gUHXhDRsxJ+RTyGdu6Ir6ZxgHlFyc4ULS7LXtPQFOyHnrrpw+0rny QZhyf1/dNvL7Plig9AGTwnn0ryxiUeHHJfgve0P8c5nH8glIE1Z8H3y9nKmX4yWC7Bfp +0nep9YQadNRAePA8K89Cr+zOmYwexNqlEOBBOeX9KC1EbC1GQbCtCLqMHPWFzdt6Dwa nliA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id z14-20020a17090ad78e00b0027782fd462esi11130563pju.5.2023.10.09.00.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 00:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8EB3B80218A5; Mon, 9 Oct 2023 00:56:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234371AbjJIH4m (ORCPT + 99 others); Mon, 9 Oct 2023 03:56:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232666AbjJIH4l (ORCPT ); Mon, 9 Oct 2023 03:56:41 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0E6E58F for ; Mon, 9 Oct 2023 00:56:40 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1C1301FB; Mon, 9 Oct 2023 00:57:20 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 76C913F762; Mon, 9 Oct 2023 00:56:37 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Will Deacon , Mark Rutland , linux-kernel@vger.kernel.org Subject: [PATCH] driver: perf: arm_pmuv3: Read PMMIR_EL1 unconditionally Date: Mon, 9 Oct 2023 13:26:31 +0530 Message-Id: <20231009075631.193208-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Mon, 09 Oct 2023 00:56:49 -0700 (PDT) X-Spam-Level: ** PMMIR_EL1 needs to be captured in 'armpmu->reg_pmmir', for all appropriate PMU version implementations where the register is available and reading it is valid . Hence checking for bus slot event presence is redundant and can be dropped. Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- This applies on v6.6-rc5. drivers/perf/arm_pmuv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c index 1e72b486c033..9fc1b6da5106 100644 --- a/drivers/perf/arm_pmuv3.c +++ b/drivers/perf/arm_pmuv3.c @@ -1129,7 +1129,7 @@ static void __armv8pmu_probe_pmu(void *info) pmceid, ARMV8_PMUV3_MAX_COMMON_EVENTS); /* store PMMIR register for sysfs */ - if (is_pmuv3p4(pmuver) && (pmceid_raw[1] & BIT(31))) + if (is_pmuv3p4(pmuver)) cpu_pmu->reg_pmmir = read_pmmir(); else cpu_pmu->reg_pmmir = 0; -- 2.25.1