[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR12MB5676C2514A46721EB8D60505A0A5A@SJ0PR12MB5676.namprd12.prod.outlook.com>
Date: Fri, 3 Nov 2023 02:14:27 +0000
From: Besar Wicaksono <bwicaksono@...dia.com>
To: Ilkka Koskinen <ilkka@...amperecomputing.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Robin Murphy <robin.murphy@....com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Raag Jadav <raag.jadav@...el.com>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] perf: arm_cspmu: Reject events meant for other PMUs
Hi Ilkka,
Thanks for fixing it.
Reviewed-by: Besar Wicaksono <bwicaksono@...dia.com>
Regards,
Besar
> -----Original Message-----
> From: Ilkka Koskinen <ilkka@...amperecomputing.com>
> Sent: Thursday, November 2, 2023 7:17 PM
> To: Besar Wicaksono <bwicaksono@...dia.com>; Suzuki K Poulose
> <suzuki.poulose@....com>; Robin Murphy <robin.murphy@....com>; Will
> Deacon <will@...nel.org>; Mark Rutland <mark.rutland@....com>; Raag
> Jadav <raag.jadav@...el.com>; Ilkka Koskinen
> <ilkka@...amperecomputing.com>
> Cc: linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] perf: arm_cspmu: Reject events meant for other PMUs
>
> External email: Use caution opening links or attachments
>
>
> 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@...r.kernel.org
> Fixes: e37dfd65731d ("perf: arm_cspmu: Add support for ARM CoreSight
> PMU driver")
> Signed-off-by: Ilkka Koskinen <ilkka@...amperecomputing.com>
> ---
> 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
Powered by blists - more mailing lists