• Robin Murphy's avatar
    perf/arm-cmn: Refactor node ID handling. Again. · e79634b5
    Robin Murphy authored
    The scope of the "extra device ports" configuration is not made clear by
    the CMN documentation - so far we've assumed it applies globally, based
    on the sole example which suggests as much. However it transpires that
    this is incorrect, and the format does in fact vary based on each
    individual XP's port configuration. As a consequence, we're currenly
    liable to decode the port/device indices from a node ID incorrectly,
    thus program the wrong event source in the DTM leading to bogus event
    counts, and also show device topology on the wrong ports in debugfs.
    
    To put this right, rework node IDs yet again to carry around the
    additional data necessary to decode them properly per-XP. At this point
    the notion of fully decomposing an ID becomes more impractical than it's
    worth, so unabstracting the XY mesh coordinates (where 2/3 users were
    just debug anyway) ends up leaving things a bit simpler overall.
    
    Fixes: 60d15040 ("perf/arm-cmn: Support new IP features")
    Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Link: https://lore.kernel.org/r/5195f990152fc37adba5fbf5929a6b11063d9f09.1725296395.git.robin.murphy@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
    e79634b5
arm-cmn.c 79 KB