[PATCH v1 02/11] coresight: Set per CPU source pointer
Suzuki K Poulose
suzuki.poulose at arm.com
Wed Jun 4 03:03:49 PDT 2025
On 03/06/2025 15:12, James Clark wrote:
>
>
> On 16/05/2025 5:07 pm, Leo Yan wrote:
>> Introduce coresight_set_percpu_source() for setting CPU source device.
>> The
>> sources are maintained in a per CPU structure 'csdev_source'.
>>
>> The coresight_register() function cannot be used for setting CPU source
>> device as it is absent info for CPU ID. So this commit uses the ETM3 and
>> ETM4 drivers to set and clear CPU sources in probing and removal,
>> respectively.
>>
>
> I agree that doing it in coresight_register() would be better and
> slightly less fragile.
>
> You could add 'cpu' to 'struct coresight_desc' and then do the
> assignment to 'csdev_source' in coresight_register() if
> coresight_is_percpu_source() == true.
+1, add it to the coresight_desc and you could use the dev.subtype to
detect if this is per-cpu source.
Suzuki
More information about the linux-arm-kernel
mailing list