linux-stable/drivers/hwtracing
Suzuki K Poulose 614744f4e8 coresight: dynamic-replicator: Handle multiple connections
[ Upstream commit 30af4fb619 ]

When a replicator port is enabled, we block the traffic
on the other port and route all traffic to the new enabled
port. If there are two active trace sessions each targeting
the two different paths from the replicator, the second session
will disable the first session and route all the data to the
second path.
                    ETR
                 /
e.g, replicator
                 \
                    ETB

If CPU0 is operated in sysfs mode to ETR and CPU1 is operated
in perf mode to ETB, depending on the order in which the
replicator is enabled one device is blocked.

Ideally we need trace-id for the session to make the
right choice. That implies we need a trace-id allocation
logic for the coresight subsystem and use that to route
the traffic. The short term solution is to only manage
the "target port" and leave the other port untouched.
That leaves both the paths unaffected, except that some
unwanted traffic may be pushed to the paths (if the Trace-IDs
are not far enough), which is still fine and can be filtered
out while processing rather than silently blocking the data.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-20 18:47:29 +01:00
..
coresight coresight: dynamic-replicator: Handle multiple connections 2019-11-20 18:47:29 +01:00
intel_th intel_th: pci: Add Jasper Lake PCH support 2019-11-12 19:20:42 +01:00
stm stm class: Fix a double free of stm_source_device 2019-09-06 10:22:18 +02:00
Kconfig hwtracing: Add HW tracing support menu 2018-03-29 13:38:10 +03:00