]> Git Repo - J-linux.git/commitdiff
perf/arm-cmn: Ensure port and device id bits are set properly
authorNamhyung Kim <[email protected]>
Thu, 21 Nov 2024 00:13:34 +0000 (16:13 -0800)
committerCatalin Marinas <[email protected]>
Mon, 25 Nov 2024 18:53:05 +0000 (18:53 +0000)
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 <[email protected]>
Acked-by: Will Deacon <[email protected]>
Reviewed-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
drivers/perf/arm-cmn.c

index 49bd811c6fd6efdd9f7b6a4d1cf1813c31b1bea9..b20fa600e510c54ff73ff8aff9c036f0e444092b 100644 (file)
@@ -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:
This page took 0.076559 seconds and 4 git commands to generate.