Re: [PATCH 04/25] coresight: perf: End AUX output when an event is throttled

From: Leo Yan

Date: Tue Nov 24 2026 - 04:29:04 EST


Hi Song,

On Mon, Nov 23, 2026 at 11:07:37AM -0800, Song Liu wrote:
> Hi Leo,
>
> On Tue, Sep 15, 2026 at 8:49 AM Leo Yan <leo.yan@xxxxxxx> wrote:
> >
> > Since commit 9734e25fbf5a ("perf: Fix the throttle logic for a
> > group"), the perf core stops every event in a throttled group by calling
> > the PMU stop callback with flags set to zero:
> >
> > perf_event_throttle()
> > `> event->pmu->stop(event, 0)
> >
> > The ETM perf stop callback only ends the AUX output handle when
> > PERF_EF_UPDATE was set. For throttling with mode is zero, it skips to
> > end the AUX handle. When the event is later unthrottled and ETM tracing
> > is started again, perf_aux_output_begin() sees the perf handle is nest
> > enabled and triggers a warning:
>
> While testing this patch, we found a crash:

> [20123.449766] Call trace:
> [20123.454671] arm_trbe_irq_handler+0x58/0x4d8 [coresight_trbe] (P)
> [20123.466920] handle_percpu_devid_irq+0x80/0x1b0
> [20123.476029] generic_handle_domain_irq+0x3c/0x80
> [20123.485308] gic_handle_irq+0x174/0x328

...

> LLM suggests the following change should fix it. Does this make
> sense to you?

Yes, the change below looks reasonable to me overall. I have a patch
series to refactor the TRBE driver [1], and patches 05 and 09 make
similar changes.

Do you mind to test the series (or apply patches 01 ~ 09) to check
if issue can be fixed?

Thanks,
Leo

[1] https://lore.kernel.org/linux-arm-kernel/20261016-trbe_enable_disable_irq_handle_refactor-v2-0-3f57cf3199b1@xxxxxxx/