Loading
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