]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coresight: Extend width of timestamp format attribute
authorJames Clark <james.clark@linaro.org>
Fri, 28 Nov 2025 11:55:24 +0000 (11:55 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 22 Dec 2025 15:30:54 +0000 (15:30 +0000)
commit6c75940eb76db6ed003eaf8cca296ade9dd1f46d
treea2a4c9d75695dfa8aeae9fb05f766f971ad64e6a
parentf4d2f5fec06a900214166136d31bdc6fe8ee00d1
coresight: Extend width of timestamp format attribute

'timestamp' is currently 1 bit wide for on/off. To enable setting
different intervals, extend it to 4 bits wide. Keep the old bit position
for backward compatibility ("deprecated_timestamp") but don't publish in
the format/ folder. It will be removed from the documentation and can be
removed completely after enough time has passed.

ETM3x doesn't support different intervals, so validate that the value is
either 0 or 1.

Tools that read the bit positions from the format/ folder will continue
to work as before, setting either 0 or 1 for off/on. Tools that
incorrectly didn't do this and set the ETM_OPT_TS bit directly will also
continue to work because that old bit is still checked.

This avoids adding a second timestamp attribute for setting the
interval. This would be awkward to use because tools would have to be
updated to ensure that the timestamps are always enabled when an
interval is set, and the driver would have to validate that both options
are provided together. All this does is implement the semantics of a
single enum but spread over multiple fields.

Reviewed-by: Leo Yan <leo.yan@arm.com>
Tested-by: Leo Yan <leo.yan@arm.com>
Tested-by: Jie Gan <jie.gan@oss.qualcomm.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-12-4d319764cc58@linaro.org
drivers/hwtracing/coresight/coresight-etm-perf.h
drivers/hwtracing/coresight/coresight-etm3x-core.c
drivers/hwtracing/coresight/coresight-etm4x-core.c