]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
perf/arm-cmn: Fix port detection for CMN-700
authorRobin Murphy <robin.murphy@arm.com>
Wed, 12 Apr 2023 10:29:40 +0000 (11:29 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Jul 2023 10:16:54 +0000 (12:16 +0200)
commit331c1dda06b9eef3046264bf2c002d7d5ad4dda0
tree02459e40670cad921f499a0e40591c190cd114e6
parent12177721b4ded892e292e1b512138f290fd14ecd
perf/arm-cmn: Fix port detection for CMN-700

BugLink: https://bugs.launchpad.net/bugs/2025067
[ Upstream commit 2ad91e44e6b0c7ef1ed151b3bb2242a2144e6085 ]

When the "extra device ports" configuration was first added, the
additional mxp_device_port_connect_info registers were added around the
existing mxp_mesh_port_connect_info registers. What I missed about
CMN-700 is that it shuffled them around to remove this discontinuity.
As such, tweak the definitions and factor out a helper for reading these
registers so we can deal with this discrepancy easily, which does at
least allow nicely tidying up the callsites. With this we can then also
do the nice thing and skip accesses completely rather than relying on
RES0 behaviour where we know the extra registers aren't defined.

Fixes: 23760a014417 ("perf/arm-cmn: Add CMN-700 support")
Reported-by: Jing Zhang <renyu.zj@linux.alibaba.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/71d129241d4d7923cde72a0e5b4c8d2f6084525f.1681295193.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/perf/arm-cmn.c