coresight: etm3x: Update ETM3 driver to use Trace ID API
authorMike Leach <mike.leach@linaro.org>
Mon, 16 Jan 2023 12:49:19 +0000 (12:49 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 19 Jan 2023 10:16:47 +0000 (10:16 +0000)
commit9edf291091f68f4767cb9d65fa825b64021277bd
tree6a47b40e27633c3f822dd0b24d54e9b77c7b95c0
parentdf4871204e5de97e47959f826e9cd2e76b41f969
coresight: etm3x: Update ETM3 driver to use Trace ID API

Use the TraceID API to allocate ETM trace IDs dynamically.

As with the etm4x we allocate on enable / disable for perf,
allocate on enable / reset for sysfs.

Additionally we allocate on sysfs file read as both perf and sysfs
can read the ID before enabling the hardware.

Remove sysfs option to write trace ID - which is inconsistent with
both the dynamic allocation method and the fixed allocation method
previously used.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230116124928.5440-7-mike.leach@linaro.org
Documentation/ABI/testing/sysfs-bus-coresight-devices-etm3x
drivers/hwtracing/coresight/coresight-etm.h
drivers/hwtracing/coresight/coresight-etm3x-core.c
drivers/hwtracing/coresight/coresight-etm3x-sysfs.c