coresight: Make refcount a property of the connection
authorJames Clark <james.clark@arm.com>
Tue, 25 Apr 2023 14:35:37 +0000 (15:35 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 5 Jun 2023 14:46:46 +0000 (15:46 +0100)
commitae7f2b5a7b569f8ede4af9e215515e5a0b824edd
tree84aaf498f7037425f51b897192094d47a3b31b77
parente3f4e68797a960869ccae556ad63163b3dc470a2
coresight: Make refcount a property of the connection

This removes the need to do an additional lookup for the total number
of ports used and also removes the need to allocate an array of
refcounts which is just another representation of a connection array.

This was only used for link type devices, for regular devices a single
refcount on the coresight device is used.

There is a both an input and output refcount in case two link type
devices are connected together so that they don't overwrite each other's
counts.

Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230425143542.2305069-11-james.clark@arm.com
drivers/hwtracing/coresight/coresight-core.c
drivers/hwtracing/coresight/coresight-etb10.c
drivers/hwtracing/coresight/coresight-funnel.c
drivers/hwtracing/coresight/coresight-platform.c
drivers/hwtracing/coresight/coresight-replicator.c
drivers/hwtracing/coresight/coresight-tmc-etf.c
drivers/hwtracing/coresight/coresight-tmc-etr.c
drivers/hwtracing/coresight/coresight-tpda.c
drivers/hwtracing/coresight/coresight-tpiu.c
drivers/hwtracing/coresight/ultrasoc-smb.c
include/linux/coresight.h