Commit 50572064 authored by Ilkka Koskinen's avatar Ilkka Koskinen Committed by Will Deacon

perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count)

AmpereOneX mesh implementation has a bug in HN-P nodes that makes them
report incorrect child count. The failing crosspoints report 8 children
while they only have two.

When the driver tries to access the inexistent child nodes, it believes it
has reached an invalid node type and probing fails. The workaround is to
ignore those incorrect child nodes and continue normally.
Signed-off-by: default avatarIlkka Koskinen <ilkka@os.amperecomputing.com>
[ rm: rewrote simpler generalised version ]
Tested-by: default avatarIlkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/ce4b1442135fe03d0de41859b04b268c88c854a3.1707498577.git.robin.murphy@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent f9daab0a
...@@ -2305,6 +2305,17 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset) ...@@ -2305,6 +2305,17 @@ static int arm_cmn_discover(struct arm_cmn *cmn, unsigned int rgn_offset)
dev_dbg(cmn->dev, "ignoring external node %llx\n", reg); dev_dbg(cmn->dev, "ignoring external node %llx\n", reg);
continue; continue;
} }
/*
* AmpereOneX erratum AC04_MESH_1 makes some XPs report a bogus
* child count larger than the number of valid child pointers.
* A child offset of 0 can only occur on CMN-600; otherwise it
* would imply the root node being its own grandchild, which
* we can safely dismiss in general.
*/
if (reg == 0 && cmn->part != PART_CMN600) {
dev_dbg(cmn->dev, "bogus child pointer?\n");
continue;
}
arm_cmn_init_node_info(cmn, reg & CMN_CHILD_NODE_ADDR, dn); arm_cmn_init_node_info(cmn, reg & CMN_CHILD_NODE_ADDR, dn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment