[PATCH v1] Coresight: Narrow down the matching range of tpdm

Songwei Chai posted 1 patch 1 month, 2 weeks ago
There is a newer version of this series
drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH v1] Coresight: Narrow down the matching range of tpdm
Posted by Songwei Chai 1 month, 2 weeks ago
The format of tpdm's peripheral id is 1f0exx. To avoid potential
conflicts in the future, update the .id_table's id to 0x001f0e00.
This update will narrow down the matching range and prevent incorrect
matches. For example, another component's peripheral id might be
f0e00, which would incorrectly match the old id.

Signed-off-by: Songwei Chai <quic_songchai@quicinc.com>
---
 drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c
index b7d99e91ab84..8e2985d17549 100644
--- a/drivers/hwtracing/coresight/coresight-tpdm.c
+++ b/drivers/hwtracing/coresight/coresight-tpdm.c
@@ -1308,8 +1308,8 @@ static void tpdm_remove(struct amba_device *adev)
  */
 static struct amba_id tpdm_ids[] = {
 	{
-		.id = 0x000f0e00,
-		.mask = 0x000fff00,
+		.id = 0x001f0e00,
+		.mask = 0x00ffff00,
 	},
 	{ 0, 0, NULL },
 };
Re: [PATCH v1] Coresight: Narrow down the matching range of tpdm
Posted by Suzuki K Poulose 1 month, 2 weeks ago
On 09/10/2024 09:50, Songwei Chai wrote:
> The format of tpdm's peripheral id is 1f0exx. To avoid potential
> conflicts in the future, update the .id_table's id to 0x001f0e00.
> This update will narrow down the matching range and prevent incorrect
> matches. For example, another component's peripheral id might be
> f0e00, which would incorrectly match the old id.
> 
> Signed-off-by: Songwei Chai <quic_songchai@quicinc.com>
> ---
>   drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c
> index b7d99e91ab84..8e2985d17549 100644
> --- a/drivers/hwtracing/coresight/coresight-tpdm.c
> +++ b/drivers/hwtracing/coresight/coresight-tpdm.c
> @@ -1308,8 +1308,8 @@ static void tpdm_remove(struct amba_device *adev)
>    */
>   static struct amba_id tpdm_ids[] = {
>   	{
> -		.id = 0x000f0e00,
> -		.mask = 0x000fff00,
> +		.id = 0x001f0e00,
> +		.mask = 0x00ffff00,
>   	},
>   	{ 0, 0, NULL },
>   };
> 

Please could you add "Fixes" tag for this ? You don't want an old kernel 
detect something else as TPDM, so this must go to stable kernels.
Also, while at it, please could you intend the id and mask values with
tabs, so it is easier to what exactly we are matching ? e.g,


	.id	= 0x001f0e00,
	.mask	= 0x00ffff00,

Kind regards
Suzuki
Re: [PATCH v1] Coresight: Narrow down the matching range of tpdm
Posted by songchai 1 month, 2 weeks ago
On 10/9/2024 4:54 PM, Suzuki K Poulose wrote:
> On 09/10/2024 09:50, Songwei Chai wrote:
>> The format of tpdm's peripheral id is 1f0exx. To avoid potential
>> conflicts in the future, update the .id_table's id to 0x001f0e00.
>> This update will narrow down the matching range and prevent incorrect
>> matches. For example, another component's peripheral id might be
>> f0e00, which would incorrectly match the old id.
>>
>> Signed-off-by: Songwei Chai <quic_songchai@quicinc.com>
>> ---
>>   drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c 
>> b/drivers/hwtracing/coresight/coresight-tpdm.c
>> index b7d99e91ab84..8e2985d17549 100644
>> --- a/drivers/hwtracing/coresight/coresight-tpdm.c
>> +++ b/drivers/hwtracing/coresight/coresight-tpdm.c
>> @@ -1308,8 +1308,8 @@ static void tpdm_remove(struct amba_device *adev)
>>    */
>>   static struct amba_id tpdm_ids[] = {
>>       {
>> -        .id = 0x000f0e00,
>> -        .mask = 0x000fff00,
>> +        .id = 0x001f0e00,
>> +        .mask = 0x00ffff00,
>>       },
>>       { 0, 0, NULL },
>>   };
>>
>
> Please could you add "Fixes" tag for this ? You don't want an old 
> kernel detect something else as TPDM, so this must go to stable kernels.
> Also, while at it, please could you intend the id and mask values with
> tabs, so it is easier to what exactly we are matching ? e.g,
Thanks for your quick response, Suzuki.
Corrected it in the new version!
>
>
>     .id    = 0x001f0e00,
>     .mask    = 0x00ffff00,
>
> Kind regards
> Suzuki
>
>