[PATCH 2/4] perf/arm-cmn: Add CMN-650 support
Ilkka Koskinen
ilkka at os.amperecomputing.com
Thu Apr 21 14:26:53 PDT 2022
On Thu, 21 Apr 2022, Robin Murphy wrote:
> On 2022-04-21 08:25, Ilkka Koskinen wrote:
>>
>> I still have a couple tiny comments. Otherwise the patch set looks good to
>> me.
>>
>> On Mon, 18 Apr 2022, Robin Murphy wrote:
>>> Add the identifiers and events for CMN-650, which slots into its
>>> evolutionary position between CMN-600 and the 700-series products.
>>> Imagine CMN-600 made bigger, and with most of the rough edges smoothed
>>> off, but that then balanced out by some bonkers PMU functionality for
>>> the new HN-P enhancement in CMN-650r2.
>>>
>>> Most of the CXG events are actually common to newer revisions of CMN-600
>>> too, so they're arguably a little late; oh well.
>>>
>>> Signed-off-by: Robin Murphy <robin.murphy at arm.com>
>>> ---
>>> drivers/perf/arm-cmn.c | 222 ++++++++++++++++++++++++++++++++---------
>>> 1 file changed, 176 insertions(+), 46 deletions(-)
>>>
>>> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
>>> index 9c1d82be7a2f..cce8516d465c 100644
>>> --- a/drivers/perf/arm-cmn.c
>>> +++ b/drivers/perf/arm-cmn.c
>>> @@ -607,12 +624,29 @@ static umode_t arm_cmn_event_attr_is_visible(struct
>>> kobject *kobj,
>>> }
>>>
>>> /* Revision-specific differences */
>>> - if (cmn->model == CMN600 && cmn->rev < CMN600_R1P2) {
>>> - if (eattr->type == CMN_TYPE_HNF && eattr->eventid == 0x1b)
>>> - return 0;
>>> + if (cmn->model == CMN600) {
>>> + if (cmn->rev < CMN600_R1P3) {
>>> + if (type == CMN_TYPE_CXRA && eventid > 0x10)
>>> + return 0;
>>> + }
>>> + if (cmn->rev < CMN600_R1P2) {
>>> + if (type == CMN_TYPE_HNF && eventid == 0x1b)
>>> + return 0;
>>> + if (type == CMN_TYPE_CXRA || type == CMN_TYPE_CXHA)
>>> + return 0;
>>> + }
>>> + } else if (cmn->model == CMN650) {
>>> + if (cmn->rev < CMN650_R2P0 || cmn->rev == CMN650_R1P2) {
>>> + if (type == CMN_TYPE_HNF && eventid > 0x22)
>>> + return 0;
>>> + if (type == CMN_TYPE_SBSX && eventid == 0x17)
>>> + return 0;
>>> + if (type == CMN_TYPE_RNI && eventid > 0x10)
>>> + return 0;
>>> + }
>>
>> What's the plan with cmn-650 r2p0 event settings? There seem to be a few
>> extra ones made visible now. I'm fine with updating this patch or taking
>> care of them in a separate one, which ever makes more sense.
>
> arm_cmn_event_attrs *should* contain all the events supported by r2p0, with
> the ones not present on earlier revisions then being filtered out here. Have
> I missed anything? Note that HN-Ps don't need per-event filtering since that
> node type simply doesn't exist prior to CMN-650 r2, so is already filtered by
> arm_cmn_node().
Ah, I was comparing the code and perf output to HN-F and RN-I event
summary tables in TRM. The tables are missing some of the events where as
the event_sel register descriptions have all of them listed. So, that was
my mistake and everything looks good.
Cheers, Ilkka
>
> Thanks,
> Robin.
>
More information about the linux-arm-kernel
mailing list