]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf/arm-cmn: Fix DVM node events
authorRobin Murphy <robin.murphy@arm.com>
Fri, 29 May 2026 14:33:45 +0000 (15:33 +0100)
committerWill Deacon <will@kernel.org>
Wed, 3 Jun 2026 19:50:24 +0000 (20:50 +0100)
The new DVM node events added in CMN-700 also apply to CMN S3; fix
the model encoding so that we can expose the aliases and handle
occupancy filtering on newer CMNs too.

Cc: stable@vger.kernel.org
Fixes: 0dc2f4963f7e ("perf/arm-cmn: Support CMN S3")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c

index f5305c8fdca43f7f895cc5a234918cd7c79599a7..6e5cc4086a9e2d8a35eca3835997dabe3c668269 100644 (file)
 enum cmn_model {
        CMN600 = 1,
        CMN650 = 2,
-       CMN700 = 4,
-       CI700 = 8,
+       CI700 = 4,
+       CMN700 = 8,
        CMNS3 = 16,
        /* ...and then we can use bitmap tricks for commonality */
        CMN_ANY = -1,
        NOT_CMN600 = -2,
-       CMN_650ON = CMN650 | CMN700 | CMNS3,
+       CMN_700ON = ~(CMN700 - 1),
+       CMN_650ON = CMN_700ON | CMN650,
 };
 
 /* Actual part numbers and revision IDs defined by the hardware */
@@ -919,14 +920,14 @@ static struct attribute *arm_cmn_event_attrs[] = {
        CMN_EVENT_DVM(NOT_CMN600, txsnp_stall,          0x0a),
        CMN_EVENT_DVM(NOT_CMN600, trkfull,              0x0b),
        CMN_EVENT_DVM_OCC(NOT_CMN600, trk_occupancy,    0x0c),
-       CMN_EVENT_DVM_OCC(CMN700, trk_occupancy_cxha,   0x0d),
-       CMN_EVENT_DVM_OCC(CMN700, trk_occupancy_pdn,    0x0e),
-       CMN_EVENT_DVM(CMN700, trk_alloc,                0x0f),
-       CMN_EVENT_DVM(CMN700, trk_cxha_alloc,           0x10),
-       CMN_EVENT_DVM(CMN700, trk_pdn_alloc,            0x11),
-       CMN_EVENT_DVM(CMN700, txsnp_stall_limit,        0x12),
-       CMN_EVENT_DVM(CMN700, rxsnp_stall_starv,        0x13),
-       CMN_EVENT_DVM(CMN700, txsnp_sync_stall_op,      0x14),
+       CMN_EVENT_DVM_OCC(CMN_700ON, trk_occupancy_cxha, 0x0d),
+       CMN_EVENT_DVM_OCC(CMN_700ON, trk_occupancy_pdn, 0x0e),
+       CMN_EVENT_DVM(CMN_700ON, trk_alloc,             0x0f),
+       CMN_EVENT_DVM(CMN_700ON, trk_cxha_alloc,        0x10),
+       CMN_EVENT_DVM(CMN_700ON, trk_pdn_alloc,         0x11),
+       CMN_EVENT_DVM(CMN_700ON, txsnp_stall_limit,     0x12),
+       CMN_EVENT_DVM(CMN_700ON, rxsnp_stall_starv,     0x13),
+       CMN_EVENT_DVM(CMN_700ON, txsnp_sync_stall_op,   0x14),
 
        CMN_EVENT_HNF(CMN_ANY, cache_miss,              0x01),
        CMN_EVENT_HNF(CMN_ANY, slc_sf_cache_access,     0x02),