]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coresight: Interpret ETMv3 config with ATTR_CFG_GET_FLD()
authorJames Clark <james.clark@linaro.org>
Fri, 28 Nov 2025 11:55:18 +0000 (11:55 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 22 Dec 2025 15:30:53 +0000 (15:30 +0000)
commita1d19cd2b1a6c41783caa49fc28e89f434673198
tree0f94ffda2cfaf3eb8ba7c2c82083f8d016bec991
parent458db6257149f3959469c880de80eba3e2494479
coresight: Interpret ETMv3 config with ATTR_CFG_GET_FLD()

Currently we're programming attr->config directly into ETMCR after some
validation. This obscures which fields are being used, and also makes it
impossible to move fields around or use other configN fields in the
future.

Improve it by only reading the fields that are valid and then setting
the appropriate ETMCR bits based on each one.

The ETMCR_CTXID_SIZE part can be removed as it was never a valid option
because it's not in ETM3X_SUPPORTED_OPTIONS.

Reviewed-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Tested-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20251128-james-cs-syncfreq-v8-6-4d319764cc58@linaro.org
drivers/hwtracing/coresight/coresight-etm3x-core.c