Skip to content

Commit dfdf714

Browse files
namhyungctmarinas
authored andcommitted
perf/arm-cmn: Ensure port and device id bits are set properly
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: e79634b ("perf/arm-cmn: Refactor node ID handling. Again.") Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Will Deacon <will@kernel.org> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/20241121001334.331334-1-namhyung@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 02a55f2 commit dfdf714

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/perf/arm-cmn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,8 +2178,6 @@ static int arm_cmn_init_dtcs(struct arm_cmn *cmn)
21782178
continue;
21792179

21802180
xp = arm_cmn_node_to_xp(cmn, dn);
2181-
dn->portid_bits = xp->portid_bits;
2182-
dn->deviceid_bits = xp->deviceid_bits;
21832181
dn->dtc = xp->dtc;
21842182
dn->dtm = xp->dtm;
21852183
if (cmn->multi_dtm)
@@ -2420,6 +2418,8 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
24202418
}
24212419

24222420
arm_cmn_init_node_info(cmn, reg & CMN_CHILD_NODE_ADDR, dn);
2421+
dn->portid_bits = xp->portid_bits;
2422+
dn->deviceid_bits = xp->deviceid_bits;
24232423

24242424
switch (dn->type) {
24252425
case CMN_TYPE_DTC:

0 commit comments

Comments
 (0)