Skip to content

Commit 678a5d3

Browse files
rmurphy-armwilldeacon
authored andcommitted
perf/arm-cmn: Minor event type housekeeping
While handling RN-D nodes under the functionally-identical RN-I type works fine for perf tool users using the "rnid_" event aliases, and that is the documented and expected ABI, there's little reason not to be permissive and accept the actual RN-D type as an additional encoding for the same events as well. This may be convenient for other tooling generating event configs directly from its own topology data. In the RN-I event mood, it also seems as good a time as any to clean up a forgotten macro for CCLA_RNI events which ended up being unnecessary. Signed-off-by: Robin Murphy <[email protected]> Reviewed-by: Ilkka Koskinen <[email protected]> Link: https://lore.kernel.org/r/ef46a47fc4ab909093f14b2b4289a4835836ab6c.1738851844.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
1 parent dc4d58a commit 678a5d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/perf/arm-cmn.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,6 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
802802
CMN_EVENT_ATTR(_model, ccha_##_name, CMN_TYPE_CCHA, _event)
803803
#define CMN_EVENT_CCLA(_name, _event) \
804804
CMN_EVENT_ATTR(CMN_ANY, ccla_##_name, CMN_TYPE_CCLA, _event)
805-
#define CMN_EVENT_CCLA_RNI(_name, _event) \
806-
CMN_EVENT_ATTR(CMN_ANY, ccla_rni_##_name, CMN_TYPE_CCLA_RNI, _event)
807805
#define CMN_EVENT_HNS(_name, _event) \
808806
CMN_EVENT_ATTR(CMN_ANY, hns_##_name, CMN_TYPE_HNS, _event)
809807

@@ -1798,6 +1796,9 @@ static int arm_cmn_event_init(struct perf_event *event)
17981796
} else if (type == CMN_TYPE_XP &&
17991797
(cmn->part == PART_CMN700 || cmn->part == PART_CMN_S3)) {
18001798
hw->wide_sel = true;
1799+
} else if (type == CMN_TYPE_RND) {
1800+
/* Secretly permit this as an alias for "rnid" events */
1801+
type = CMN_TYPE_RNI;
18011802
}
18021803

18031804
/* This is sufficiently annoying to recalculate, so cache it */

0 commit comments

Comments
 (0)