Re: [PATCH v2 22/23] coresight: trbe: Restart trace source for stopped buffers
From: Leo Yan
Date: Tue Dec 01 2026 - 07:52:27 EST
On Tue, Dec 01, 2026 at 12:14:44PM +0000, Suzuki K Poulose wrote:
> On 16/10/2026 17:55, Leo Yan wrote:
> > When TRBSR reports a stopped buffer, the IRQ handler closes the current
> > AUX buffer and programs TRBE for the next run. This creates a trace
> > discontinuity. User tool has to reset the decoder when moving to the
> > next AUX data block, which can reduce decoded trace coverage.
> >
> > Stop and restart the trace source around TRBE reprogramming for stopped
> > buffers. This emits ASYNC packets, allowing the decoder to recognize
> > discontinuity without a full reset.
> >
> > This duplicates part of the trace source enable/disable code in the
> > ETMv4 driver. Reusing that code would require splitting the ETMv4
> > callbacks into finer-grained helpers that TRBE can call, which would
> > make the change much larger. Keep the TRBE change self-contained for
> > now.
>
> This is risky. There are implementations of ETE that use MMIO access
> and this will break such systems.
The Arm ARM states that FEAT_TRBE requires FEAT_ETE, and FEAT_ETE
requires FEAT_TRC_SR. So the ETE connected to TRBE must support
system register access.
> I would rather do it properly with the etmv4 driver code refactoring.
Sure, I'll look into refactoring the core and driver for a cleaner
solution.
Thanks,
Leo