Patch "perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count)" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-arm-cmn-workaround-ampereonex-errata-ac04_mesh_.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9fcaca53ab17f102e1774d9f698520f967473e28
Author: Ilkka Koskinen <ilkka@xxxxxxxxxxxxxxxxxxxxxx>
Date:   Fri Feb 9 17:11:09 2024 +0000

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

diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index 47e7c3206939f..899e4ed49905c 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -2178,6 +2178,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);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux