* [PATCH] coresight: perf: Release Coresight path when alloc trace id failed
@ 2023-04-25 3:24 Ruidong Tian
2023-04-25 9:14 ` Suzuki K Poulose
0 siblings, 1 reply; 2+ messages in thread
From: Ruidong Tian @ 2023-04-25 3:24 UTC (permalink / raw)
To: tianruidong, coresight
Cc: suzuki.poulose, mike.leach, leo.yan, alexander.shishkin,
linux-arm-kernel, linux-kernel
Error handler for etm_setup_aux can not release coresight path because
cpu mask was cleared when coresight_trace_id_get_cpu_id failed.
Call coresight_release_path function explicitly when alloc trace id filed.
Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
---
drivers/hwtracing/coresight/coresight-etm-perf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index 711f451b6946..89e8ed214ea4 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -402,6 +402,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages,
trace_id = coresight_trace_id_get_cpu_id(cpu);
if (!IS_VALID_CS_TRACE_ID(trace_id)) {
cpumask_clear_cpu(cpu, mask);
+ coresight_release_path(path);
continue;
}
--
2.33.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] coresight: perf: Release Coresight path when alloc trace id failed
2023-04-25 3:24 [PATCH] coresight: perf: Release Coresight path when alloc trace id failed Ruidong Tian
@ 2023-04-25 9:14 ` Suzuki K Poulose
0 siblings, 0 replies; 2+ messages in thread
From: Suzuki K Poulose @ 2023-04-25 9:14 UTC (permalink / raw)
To: Ruidong Tian, coresight
Cc: mike.leach, leo.yan, alexander.shishkin, linux-arm-kernel, linux-kernel
On 25/04/2023 04:24, Ruidong Tian wrote:
> Error handler for etm_setup_aux can not release coresight path because
> cpu mask was cleared when coresight_trace_id_get_cpu_id failed.
>
> Call coresight_release_path function explicitly when alloc trace id filed.
>
> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Good catch, I will queue this.
Thanks
Suzuki
> ---
> drivers/hwtracing/coresight/coresight-etm-perf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
> index 711f451b6946..89e8ed214ea4 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -402,6 +402,7 @@ static void *etm_setup_aux(struct perf_event *event, void **pages,
> trace_id = coresight_trace_id_get_cpu_id(cpu);
> if (!IS_VALID_CS_TRACE_ID(trace_id)) {
> cpumask_clear_cpu(cpu, mask);
> + coresight_release_path(path);
> continue;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-25 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 3:24 [PATCH] coresight: perf: Release Coresight path when alloc trace id failed Ruidong Tian
2023-04-25 9:14 ` Suzuki K Poulose
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®