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

Will Deacon will at kernel.org
Fri Feb 9 09:02:51 PST 2024


On Tue, Feb 06, 2024 at 01:04:27PM -0800, Ilkka Koskinen wrote:
> On Tue, 6 Feb 2024, Robin Murphy wrote:
> > On 2024-02-05 7:46 pm, Ilkka Koskinen wrote:
> > diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> > index c584165b13ba..7e3aa7e2345f 100644
> > --- a/drivers/perf/arm-cmn.c
> > +++ b/drivers/perf/arm-cmn.c
> > @@ -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);
> > 				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);
> > 
> 
> Tested-by: Ilkka Koskinen <ilkka at os.amperecomputing.com>

Mind sending that out as a proper patch that I can pick up, please?

Cheers,

Will



More information about the linux-arm-kernel mailing list