Re: [PATCH v4 17/19] coresight: core: Add support for dedicated percpu sinks

From: Suzuki K Poulose
Date: Mon Mar 22 2021 - 12:58:36 EST


Hi Mike

On 08/03/2021 17:26, Mike Leach wrote:

Hi,

On Thu, 25 Feb 2021 at 19:36, Suzuki K Poulose <suzuki.poulose@xxxxxxx> wrote:

From: Anshuman Khandual <anshuman.khandual@xxxxxxx>

Add support for dedicated sinks that are bound to individual CPUs. (e.g,
TRBE). To allow quicker access to the sink for a given CPU bound source,
keep a percpu array of the sink devices. Also, add support for building
a path to the CPU local sink from the ETM.

This adds a new percpu sink type CORESIGHT_DEV_SUBTYPE_SINK_PERCPU_SYSMEM.
This new sink type is exclusively available and can only work with percpu
source type device CORESIGHT_DEV_SUBTYPE_SOURCE_PROC.


Minor nit: FEAT_TRBE architecturally guarantees a compatible
architectural FEAT_ETE source.
However _all_ CPU sources have CORESIGHT_DEV_SUBTYPE_SOURCE_PROC set,
ETMv3.x, PTM, ETM4.x and ETE alike.
In the code that follows - coresight_is_percpu_source() checks it is
any type of CPU source, not the FEAT_ETE type, which is fine as we
then check the cpu and if it has TRBE.

Agreed. But we would like to keep this CoreSight generic code away from the specifics of underlying "source", which is why we used the generic notion of a per-CPU source.

So the simplifications to the code from the first couple of patch sets
make this explanation slightly misleading. Could do to adjust if
re-spinning set.

Reviewed-by: Mike Leach <mike.leach@xxxxxxxxxx>

Thanks
Suzuki