On Mon, Mar 16, 2026 at 02:28:35PM +0000, Suzuki K Poulose wrote:
[...]
e.g., add a flag in the coresight_desc.flags = CORESIGHT_DESC_CPU_BOUND
and then desc.cpu describes the associated CPU. Otherwise, defaults to -1. That way you could restrict the changes to only those that need the CPU (ETMx and CTIs ?) Also makes any new driver safe.
Instead of adding a flag, I'd use a helper to check existed flags:
static inline bool coresight_is_cpu_bound(struct coresight_device *csdev) { if (!csdev) return false;
if (coresight_is_percpu_source(csdev)) return true; if (csdev->type == CORESIGHT_DEV_TYPE_HELPER && csdev->subtype.helper_subtype == CORESIGHT_DEV_SUBTYPE_HELPER_ECT_CTI)That works, but if a new device type comes in, we may have to expand the list. Having a flag makes much more sense and the core driver only does what has been asked for. I prefer the flags.
Sure, I will add a new flag. Thanks!