Skip to contentSkip to conversation

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

PATCH Applied Ilkka Koskinen 3 participants 6 messages Aug 8, 2022 – Sep 22, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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.

---

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

drivers/perf/arm-cmn.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/arm-cmn.c +1 -1
index 80d8309652a4..b80a9b74662b 100644
@@ -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
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ilkka Koskinen

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!

Quoted 21 lines

---

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

drivers/perf/arm-cmn.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/arm-cmn.c +1 -1
index 80d8309652a4..b80a9b74662b 100644
@@ -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
#2 lore raw

Will,

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

Cheers, Ilkka

Quoted 34 lines · Robin Murphy
Quoted 8 lines · Ilkka Koskinen

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!

Quoted 19 lines

---

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

drivers/perf/arm-cmn.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/arm-cmn.c +1 -0
index 80d8309652a4..b80a9b74662b 100644
@@ -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
maintainer
#3 lore raw
In reply to Ilkka Koskinen
Quoted 8 lines · Ilkka Koskinen

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.

Quoted 13 lines

---

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

drivers/perf/arm-cmn.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/arm-cmn.c +0 -0
index 80d8309652a4..b80a9b74662b 100644

drivers/perf/arm-cmn.c line 42

Quoted 8 lines
drivers/perf/arm-cmn.c +1 -1
@@ -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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

Hi Robin,

Quoted 7 lines · Robin Murphy
Quoted 6 lines · Ilkka Koskinen

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.

Quoted 6 lines
Quoted 2 lines

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

Quoted 24 lines

Cheers,
Robin.

Quoted 19 lines

---

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

drivers/perf/arm-cmn.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/arm-cmn.c +1 -0
index 80d8309652a4..b80a9b74662b 100644
@@ -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
maintainer Applied
#5 lore raw
In reply to Ilkka Koskinen
Quoted 10 lines · Ilkka Koskinen

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,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev