From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84616C4332F for ; Fri, 3 Nov 2023 06:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3iJcz51Zg8381Z4SAEYpIB9+hYdWjfLtX4LULF4Zvjo=; b=LnYHFwNG4QuhjB NnXdhtcpv8OoAMnXYY8DzXy/gX6rkuiAQFW3+r74tRQU4ckz3ae4ev1mqNSOgV/eQ1CwehJ4GQV7E s9ZehT0iyLcpK/JW9nekv59Xz6Xtf9WscillkIJaEFNHVvuwFk3Ger+1hARC+J7S+TxgtiZsxrNPJ iBEa3+WKKM5GpEHI6fQsFNCS4lIWHhXwkfw1rjj+YRna65PLbDOiz9zYsuCEXCcDfAP5VF+34dugG N01cQK8qyylHleJskOZwSLjCop5L8CXLzm5K8xV2pOh3UIerc5K2cehpKIjsGWzCXN7e3y454y54O wa2R+idV4njGc/3Tu+pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyo5S-00ArBQ-0R; Fri, 03 Nov 2023 06:55:22 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyo5P-00ArB4-2B for linux-arm-kernel@lists.infradead.org; Fri, 03 Nov 2023 06:55:21 +0000 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231102_235519_765102_17C30573 X-CRM114-Status: GOOD ( 15.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel