]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count)
authorIlkka Koskinen <ilkka@os.amperecomputing.com>
Fri, 9 Feb 2024 17:11:09 +0000 (17:11 +0000)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:10 +0000 (18:19 -0400)
commit1f87429485ecd99f1a834a88cf8da2e202cc2c0e
tree40ffe556d2627c15fc77c1f1ea5d848ea83f6bd9
parentae668e2e60dc21bee2af80c85147101e7457548c
perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count)

[ Upstream commit 50572064ec7109b00eef8880e905f55861c8b3de ]

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: Ilkka Koskinen <ilkka@os.amperecomputing.com>
[ rm: rewrote simpler generalised version ]
Tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/ce4b1442135fe03d0de41859b04b268c88c854a3.1707498577.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/perf/arm-cmn.c