diff mbox series

[1/1] perf/arm-cmn: Add more bits to child node address offset field

Message ID 20220808195455.79277-1-ilkka@os.amperecomputing.com (mailing list archive)
State New, archived
Headers show
Series [1/1] perf/arm-cmn: Add more bits to child node address offset field | expand

Commit Message

Ilkka Koskinen Aug. 8, 2022, 7:54 p.m. UTC
CMN-600 uses bits [27:0] for child node address offset while bits [30:28]
are required to be zero.

For CMN-650, the child node address offset field has been increased
to include bits [29:0] while leaving only bit 30 set to zero.

Let's include the missing two bits and assume older implementations
comply with the spec and set bits [29:28] to 0.

Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
---

I have tested this patch on CMN-600 and CMN-650.

drivers/perf/arm-cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Robin Murphy Aug. 9, 2022, 10:05 a.m. UTC | #1
On 2022-08-08 20:54, Ilkka Koskinen wrote:
> CMN-600 uses bits [27:0] for child node address offset while bits [30:28]
> are required to be zero.
> 
> For CMN-650, the child node address offset field has been increased
> to include bits [29:0] while leaving only bit 30 set to zero.
> 
> Let's include the missing two bits and assume older implementations
> comply with the spec and set bits [29:28] to 0.

Ah, I don't think it ever even crossed my mind to look for changes here, 
but of course if the node regions have grown from 16KB to 64KB then it's 
only natural that offsets grow to match. I expect the CMN-700 config 
that we tested on internally would have been small enough for this not 
to make a difference. Thanks for the catch!

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> ---
> 
> I have tested this patch on CMN-600 and CMN-650.
> 
> drivers/perf/arm-cmn.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> index 80d8309652a4..b80a9b74662b 100644
> --- a/drivers/perf/arm-cmn.c
> +++ b/drivers/perf/arm-cmn.c
> @@ -36,7 +36,7 @@
>   #define CMN_CI_CHILD_COUNT		GENMASK_ULL(15, 0)
>   #define CMN_CI_CHILD_PTR_OFFSET		GENMASK_ULL(31, 16)
>   
> -#define CMN_CHILD_NODE_ADDR		GENMASK(27, 0)
> +#define CMN_CHILD_NODE_ADDR		GENMASK(29, 0)
>   #define CMN_CHILD_NODE_EXTERNAL		BIT(31)
>   
>   #define CMN_MAX_DIMENSION		12
Ilkka Koskinen Aug. 31, 2022, 4:46 a.m. UTC | #2
Will,

Would you need something more or could you pick up this patch?

Cheers, Ilkka

On Tue, 9 Aug 2022, Robin Murphy wrote:
> On 2022-08-08 20:54, Ilkka Koskinen wrote:
>> CMN-600 uses bits [27:0] for child node address offset while bits [30:28]
>> are required to be zero.
>> 
>> For CMN-650, the child node address offset field has been increased
>> to include bits [29:0] while leaving only bit 30 set to zero.
>> 
>> Let's include the missing two bits and assume older implementations
>> comply with the spec and set bits [29:28] to 0.
>
> Ah, I don't think it ever even crossed my mind to look for changes here, but 
> of course if the node regions have grown from 16KB to 64KB then it's only 
> natural that offsets grow to match. I expect the CMN-700 config that we 
> tested on internally would have been small enough for this not to make a 
> difference. Thanks for the catch!
>
> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
>
>> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>> ---
>> 
>> I have tested this patch on CMN-600 and CMN-650.
>> 
>> drivers/perf/arm-cmn.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
>> index 80d8309652a4..b80a9b74662b 100644
>> --- a/drivers/perf/arm-cmn.c
>> +++ b/drivers/perf/arm-cmn.c
>> @@ -36,7 +36,7 @@
>>   #define CMN_CI_CHILD_COUNT		GENMASK_ULL(15, 0)
>>   #define CMN_CI_CHILD_PTR_OFFSET		GENMASK_ULL(31, 16)
>>   -#define CMN_CHILD_NODE_ADDR		GENMASK(27, 0)
>> +#define CMN_CHILD_NODE_ADDR		GENMASK(29, 0)
>>   #define CMN_CHILD_NODE_EXTERNAL		BIT(31)
>>     #define CMN_MAX_DIMENSION		12
>
Robin Murphy Sept. 21, 2022, 4:17 p.m. UTC | #3
On 08/08/2022 8:54 pm, Ilkka Koskinen wrote:
> CMN-600 uses bits [27:0] for child node address offset while bits [30:28]
> are required to be zero.
> 
> For CMN-650, the child node address offset field has been increased
> to include bits [29:0] while leaving only bit 30 set to zero.
> 
> Let's include the missing two bits and assume older implementations
> comply with the spec and set bits [29:28] to 0.

Just to add that other users have run into this as well, so getting it 
applied as a fix would be just lovely. Technically I think it's:

Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features")

Cheers,
Robin.

> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> ---
> 
> I have tested this patch on CMN-600 and CMN-650.
> 
> drivers/perf/arm-cmn.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> index 80d8309652a4..b80a9b74662b 100644
> --- a/drivers/perf/arm-cmn.c
> +++ b/drivers/perf/arm-cmn.c
> @@ -36,7 +36,7 @@
>   #define CMN_CI_CHILD_COUNT		GENMASK_ULL(15, 0)
>   #define CMN_CI_CHILD_PTR_OFFSET		GENMASK_ULL(31, 16)
>   
> -#define CMN_CHILD_NODE_ADDR		GENMASK(27, 0)
> +#define CMN_CHILD_NODE_ADDR		GENMASK(29, 0)
>   #define CMN_CHILD_NODE_EXTERNAL		BIT(31)
>   
>   #define CMN_MAX_DIMENSION		12
Ilkka Koskinen Sept. 21, 2022, 7:56 p.m. UTC | #4
Hi Robin,

On Wed, 21 Sep 2022, Robin Murphy wrote:
> On 08/08/2022 8:54 pm, Ilkka Koskinen wrote:
>> CMN-600 uses bits [27:0] for child node address offset while bits [30:28]
>> are required to be zero.
>> 
>> For CMN-650, the child node address offset field has been increased
>> to include bits [29:0] while leaving only bit 30 set to zero.
>> 
>> Let's include the missing two bits and assume older implementations
>> comply with the spec and set bits [29:28] to 0.
>
> Just to add that other users have run into this as well, so getting it 
> applied as a fix would be just lovely. Technically I think it's:
>
> Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features")

Ah, that's true. Should I resend the patch with your reviewed-by and the 
fixes lines?

Cheers, Ilkka


>
> Cheers,
> Robin.
>
>> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>> ---
>> 
>> I have tested this patch on CMN-600 and CMN-650.
>> 
>> drivers/perf/arm-cmn.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
>> index 80d8309652a4..b80a9b74662b 100644
>> --- a/drivers/perf/arm-cmn.c
>> +++ b/drivers/perf/arm-cmn.c
>> @@ -36,7 +36,7 @@
>>   #define CMN_CI_CHILD_COUNT		GENMASK_ULL(15, 0)
>>   #define CMN_CI_CHILD_PTR_OFFSET		GENMASK_ULL(31, 16)
>>   -#define CMN_CHILD_NODE_ADDR		GENMASK(27, 0)
>> +#define CMN_CHILD_NODE_ADDR		GENMASK(29, 0)
>>   #define CMN_CHILD_NODE_EXTERNAL		BIT(31)
>>     #define CMN_MAX_DIMENSION		12
>
Will Deacon Sept. 22, 2022, 8:33 p.m. UTC | #5
On Mon, 8 Aug 2022 12:54:55 -0700, Ilkka Koskinen wrote:
> CMN-600 uses bits [27:0] for child node address offset while bits [30:28]
> are required to be zero.
> 
> For CMN-650, the child node address offset field has been increased
> to include bits [29:0] while leaving only bit 30 set to zero.
> 
> Let's include the missing two bits and assume older implementations
> comply with the spec and set bits [29:28] to 0.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] perf/arm-cmn: Add more bits to child node address offset field
      https://git.kernel.org/arm64/c/05d6f6d346fe

Cheers,
diff mbox series

Patch

diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index 80d8309652a4..b80a9b74662b 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -36,7 +36,7 @@ 
 #define CMN_CI_CHILD_COUNT		GENMASK_ULL(15, 0)
 #define CMN_CI_CHILD_PTR_OFFSET		GENMASK_ULL(31, 16)
 
-#define CMN_CHILD_NODE_ADDR		GENMASK(27, 0)
+#define CMN_CHILD_NODE_ADDR		GENMASK(29, 0)
 #define CMN_CHILD_NODE_EXTERNAL		BIT(31)
 
 #define CMN_MAX_DIMENSION		12