]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coresight: Add support for trace filtering by source
authorTao Zhang <quic_taozha@quicinc.com>
Fri, 13 Dec 2024 10:07:30 +0000 (18:07 +0800)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Fri, 13 Dec 2024 10:25:15 +0000 (10:25 +0000)
commitec9903d6cc34e61b77e609a0425e7a0a804fb95a
tree0bdba3c21fae9b9595f13e53ad51ff9b816066ad
parent62374ce1876be26b3f33575680e67ca69a59db54
coresight: Add support for trace filtering by source

Some replicators have hard coded filtering of "trace" data, based on the
source device. This is different from the trace filtering based on
TraceID, available in the standard programmable replicators. e.g.,
Qualcomm replicators have filtering based on custom trace protocol
format and is not programmable.

The source device could be connected to the replicator via intermediate
components (e.g., a funnel). Thus we need platform information from
the firmware tables to decide the source device corresponding to a
given output port from the replicator. Given this affects "trace
path building" and traversing the path back from the sink to source,
add the concept of "filtering by source" to the generic coresight
connection.

The specified source will be marked like below in the Devicetree.
test-replicator {
    ... ... ... ...
    out-ports {
        ... ... ... ...
        port@0 {
            reg = <0>;
            xyz: endpoint {
                remote-endpoint = <&zyx>;
                filter-source = <&source_1>; <-- To specify the source to
            };                           be filtered out here.
        };

        port@1 {
            reg = <1>;
            abc: endpoint {
                remote-endpoint = <&cba>;
                filter-source = <&source_2>; <-- To specify the source to
            };                           be filtered out here.
        };
    };
};

Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20241213100731.25914-4-quic_taozha@quicinc.com
drivers/hwtracing/coresight/coresight-core.c
drivers/hwtracing/coresight/coresight-platform.c
include/linux/coresight.h