* [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly
@ 2024-11-21 0:13 Namhyung Kim
2024-11-21 10:08 ` Robin Murphy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Namhyung Kim @ 2024-11-21 0:13 UTC (permalink / raw)
To: Will Deacon, Mark Rutland, Robin Murphy
Cc: Stephane Eranian, LKML, linux-arm-kernel
The portid_bits and deviceid_bits were set only for XP type nodes in
the arm_cmn_discover() and it confused other nodes to find XP nodes.
Copy the both bits from the XP nodes directly when it sets up a new
node.
Fixes: e79634b53e39 ("perf/arm-cmn: Refactor node ID handling. Again.")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
drivers/perf/arm-cmn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index 49bd811c6fd6efdd..b20fa600e510c54f 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -2178,8 +2178,6 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
continue;
xp = arm_cmn_node_to_xp(cmn, dn);
- dn->portid_bits = xp->portid_bits;
- dn->deviceid_bits = xp->deviceid_bits;
dn->dtc = xp->dtc;
dn->dtm = xp->dtm;
if (cmn->multi_dtm)
@@ -2420,6 +2418,8 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
}
arm_cmn_init_node_info(cmn, reg & CMN_CHILD_NODE_ADDR, dn);
+ dn->portid_bits = xp->portid_bits;
+ dn->deviceid_bits = xp->deviceid_bits;
switch (dn->type) {
case CMN_TYPE_DTC:
base-commit: 43fb83c17ba2d63dfb798f0be7453ed55ca3f9c2
--
2.47.0.338.g60cca15819-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly
2024-11-21 0:13 [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly Namhyung Kim
@ 2024-11-21 10:08 ` Robin Murphy
2024-11-25 12:52 ` Will Deacon
2024-11-25 19:12 ` Catalin Marinas
2 siblings, 0 replies; 4+ messages in thread
From: Robin Murphy @ 2024-11-21 10:08 UTC (permalink / raw)
To: Namhyung Kim, Will Deacon, Mark Rutland
Cc: Stephane Eranian, LKML, linux-arm-kernel
On 2024-11-21 12:13 am, Namhyung Kim wrote:
> The portid_bits and deviceid_bits were set only for XP type nodes in
> the arm_cmn_discover() and it confused other nodes to find XP nodes.
> Copy the both bits from the XP nodes directly when it sets up a new
> node.
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> Fixes: e79634b53e39 ("perf/arm-cmn: Refactor node ID handling. Again.")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> drivers/perf/arm-cmn.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> index 49bd811c6fd6efdd..b20fa600e510c54f 100644
> --- a/drivers/perf/arm-cmn.c
> +++ b/drivers/perf/arm-cmn.c
> @@ -2178,8 +2178,6 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
> continue;
>
> xp = arm_cmn_node_to_xp(cmn, dn);
> - dn->portid_bits = xp->portid_bits;
> - dn->deviceid_bits = xp->deviceid_bits;
> dn->dtc = xp->dtc;
> dn->dtm = xp->dtm;
> if (cmn->multi_dtm)
> @@ -2420,6 +2418,8 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
> }
>
> arm_cmn_init_node_info(cmn, reg & CMN_CHILD_NODE_ADDR, dn);
> + dn->portid_bits = xp->portid_bits;
> + dn->deviceid_bits = xp->deviceid_bits;
>
> switch (dn->type) {
> case CMN_TYPE_DTC:
>
> base-commit: 43fb83c17ba2d63dfb798f0be7453ed55ca3f9c2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly
2024-11-21 0:13 [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly Namhyung Kim
2024-11-21 10:08 ` Robin Murphy
@ 2024-11-25 12:52 ` Will Deacon
2024-11-25 19:12 ` Catalin Marinas
2 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2024-11-25 12:52 UTC (permalink / raw)
To: Namhyung Kim, catalin.marinas
Cc: Mark Rutland, Robin Murphy, Stephane Eranian, LKML, linux-arm-kernel
On Wed, Nov 20, 2024 at 04:13:34PM -0800, Namhyung Kim wrote:
> The portid_bits and deviceid_bits were set only for XP type nodes in
> the arm_cmn_discover() and it confused other nodes to find XP nodes.
> Copy the both bits from the XP nodes directly when it sets up a new
> node.
>
> Fixes: e79634b53e39 ("perf/arm-cmn: Refactor node ID handling. Again.")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> drivers/perf/arm-cmn.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Will Deacon <will@kernel.org>
Catalin -- here's another perf fix for you!
Thanks,
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly
2024-11-21 0:13 [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly Namhyung Kim
2024-11-21 10:08 ` Robin Murphy
2024-11-25 12:52 ` Will Deacon
@ 2024-11-25 19:12 ` Catalin Marinas
2 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2024-11-25 19:12 UTC (permalink / raw)
To: Will Deacon, Mark Rutland, Robin Murphy, Namhyung Kim
Cc: Stephane Eranian, LKML, linux-arm-kernel
On Wed, 20 Nov 2024 16:13:34 -0800, Namhyung Kim wrote:
> The portid_bits and deviceid_bits were set only for XP type nodes in
> the arm_cmn_discover() and it confused other nodes to find XP nodes.
> Copy the both bits from the XP nodes directly when it sets up a new
> node.
>
>
Applied to arm64 (for-next/fixes), thanks!
[1/1] perf/arm-cmn: Ensure port and device id bits are set properly
https://git.kernel.org/arm64/c/dfdf714fed55
--
Catalin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-25 19:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-21 0:13 [PATCH v2] perf/arm-cmn: Ensure port and device id bits are set properly Namhyung Kim
2024-11-21 10:08 ` Robin Murphy
2024-11-25 12:52 ` Will Deacon
2024-11-25 19:12 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®