• Suzuki K Poulose's avatar
    coresight: dynamic-replicator: Handle multiple connections · 30af4fb6
    Suzuki K Poulose authored
    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: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
    Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    30af4fb6
coresight-dynamic-replicator.c 5.49 KB