From: Mark Rutland <mark.rutland@arm.com>
To: Ilkka Koskinen <ilkka@os.amperecomputing.com>,
Will Deacon <will@kernel.org>
Cc: Besar Wicaksono <bwicaksono@nvidia.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Robin Murphy <robin.murphy@arm.com>,
Raag Jadav <raag.jadav@intel.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: arm_cspmu: Reject events meant for other PMUs
Date: Fri, 3 Nov 2023 11:37:21 +0000 [thread overview]
Message-ID: <ZUTbcQcseeoHhl8d@FVFF77S0Q05N> (raw)
In-Reply-To: <20231103001654.35565-1-ilkka@os.amperecomputing.com>
On Thu, Nov 02, 2023 at 05:16:54PM -0700, 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 <ilkka@os.amperecomputing.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Will, are you happy to pick this up?
Mark.
> ---
> 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).
> --
> 2.40.1
>
next prev parent reply other threads:[~2023-11-03 11:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 0:16 [PATCH] perf: arm_cspmu: Reject events meant for other PMUs Ilkka Koskinen
2023-11-03 2:14 ` Besar Wicaksono
2023-11-03 6:55 ` Anshuman Khandual
2023-11-03 11:37 ` Mark Rutland [this message]
2023-11-07 10:50 ` Will Deacon
2023-11-07 14:17 ` Catalin Marinas
2023-11-07 22:12 ` Ilkka Koskinen
2023-11-08 10:05 ` Catalin Marinas
2023-11-08 19:00 ` Ilkka Koskinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZUTbcQcseeoHhl8d@FVFF77S0Q05N \
--to=mark.rutland@arm.com \
--cc=bwicaksono@nvidia.com \
--cc=ilkka@os.amperecomputing.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raag.jadav@intel.com \
--cc=robin.murphy@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox