Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp286965rdf; Thu, 2 Nov 2023 23:55:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGi6ZEevAQP3Q0hLb9069m/z8YV3H3iXoXxyg8u0ygGGgV27AK+QcllXnQ7wh9QNatynzdr X-Received: by 2002:a17:90a:9405:b0:27f:f655:e14c with SMTP id r5-20020a17090a940500b0027ff655e14cmr15566344pjo.42.1698994534057; Thu, 02 Nov 2023 23:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698994534; cv=none; d=google.com; s=arc-20160816; b=dAkrvBexMt7TxbWr7DxofNcGpBOroeAwsEVeTxiNV5IVr/gVbKDsdcUsZrQx6lH+vQ 6tw307vXcwf+c4dXjlPSTzrZTWcq6cNJjIeXJb72FeUCtnmFepWf4DQ40KWYmHpNQtTB n7QGNpAQWoYSwbg9p7S5YMmTaduNDmJpogaeatCHBL9r03A5RtttJ9oW6pDhkANxcP+P U6wdCUFB4FGmpQVj7exH2PRLGyLj08eTH1JZwt5KYX4sdOTXU89IqDQGUXTR7D0ZP4HY PIw7pU1ozftlEdJNt5TiIHRfEQvc4g6ZhLbU3cW0hWoxWFJBhdfFxczNWizMTeDRyqnG Vl1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ttMuVdRZTZP8mmhvfcw+WTWv2W0biG0hx/fV1dmzk/k=; fh=UKbA1nYHeKsxRfcjOKIa9qmKQxyhznYtjQecSrGeh/w=; b=KoiUiQu5MyvdA3yJMvBsvzu+gHavE37GlP26Nsz4Fg7FU4vDG2QM8FOKp1Zpn0U3Ex H6df/fSjmyvRuTWC3PH3jd18+FoeT4wIBPg7ALKFKoKniD/JVj1fxqdT9751vpyqQK5y VuooNm0O6G7fv4qu4ZB/HCC0W/E+iJIiJDILdvn70nNn9VTUpRBQ7AleBv7y8iPLL5Pa T4zLuLgFgrG0Bg9ZpvKbTlpPYDuqMOUkzgc+gR4kYsjjdHsa6i/1da1Qzb2fXwAv0hDh esTNZxP2kYgeSZ9CfUtgzFDHbpu2+jem/flEsqYLEJrzvkUh8OR/fNJF8KPuANhiQqBd dpgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id go11-20020a17090b03cb00b002800879f482si1181035pjb.87.2023.11.02.23.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 23:55:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 8898A825EDBD; Thu, 2 Nov 2023 23:55:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232425AbjKCGzZ (ORCPT + 99 others); Fri, 3 Nov 2023 02:55:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231461AbjKCGzX (ORCPT ); Fri, 3 Nov 2023 02:55:23 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 87C1A131 for ; Thu, 2 Nov 2023 23:55:17 -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 DC66B2F4; Thu, 2 Nov 2023 23:55:59 -0700 (PDT) Received: from [10.162.41.8] (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A2EE03F67D; Thu, 2 Nov 2023 23:55:14 -0700 (PDT) Message-ID: <33686356-8c61-439d-8c73-b47ef2133cd6@arm.com> Date: Fri, 3 Nov 2023 12:25:11 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] perf: arm_cspmu: Reject events meant for other PMUs Content-Language: en-US To: Ilkka Koskinen , Besar Wicaksono , Suzuki K Poulose , Robin Murphy , Will Deacon , Mark Rutland , Raag Jadav Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20231103001654.35565-1-ilkka@os.amperecomputing.com> From: Anshuman Khandual In-Reply-To: <20231103001654.35565-1-ilkka@os.amperecomputing.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 23:55:31 -0700 (PDT) On 11/3/23 05:46, Ilkka Koskinen wrote: > Coresight PMU driver didn't reject events meant for other PMUs. > This caused some of the Core PMU events disappearing from > the output of "perf list". In addition, trying to run e.g. > > $ perf stat -e r2 sleep 1 > > made Coresight PMU driver to handle the event instead of letting > Core PMU driver to deal with it. > > Cc: stable@vger.kernel.org > Fixes: e37dfd65731d ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver") > Signed-off-by: Ilkka Koskinen > --- > drivers/perf/arm_cspmu/arm_cspmu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c > index 42b72042f6b3..2cc35dded007 100644 > --- a/drivers/perf/arm_cspmu/arm_cspmu.c > +++ b/drivers/perf/arm_cspmu/arm_cspmu.c > @@ -676,6 +676,9 @@ static int arm_cspmu_event_init(struct perf_event *event) > > cspmu = to_arm_cspmu(event->pmu); > > + if (event->attr.type != event->pmu->type) > + return -ENOENT; > + > /* > * Following other "uncore" PMUs, we do not support sampling mode or > * attach to a task (per-process mode). LGTM Reviewed-by: Anshuman Khandual