Do Illka and Robin know that there is such a register that can identify different CMN versions? Looking forward to your suggestions.
In principle the "part number" fields from CFGM_PERIPH_ID_0/1 are supposed to identify the model, but for various reasons I'm suspicious of that being unreliable (not least that no actual values are documented, only "configuration-dependent"). That's why I went down the route of making sure we have explicit ACPI/DT identifiers for every model.
However, the model alone seems either too specific or not specific enough for a jevents identifier. The defined metrics are pretty trivial and should have no real reason not to be common to *any* CMN PMU where the underlying events are present. On the other hand, if we want to get down to the level of specific events in JSON then we'd need to consider the revision as well, since there are several events which only exist on certain revisions of a given model (but often are also common to later models).
This actually foreshadows a question I was planning to bring up in the context of another driver I'm working on - for this one I would rather like to try using jevents rather than have to maintain another sprawl of event tables in a driver, but it's still going to have the same thing of wanting model/revision matching along the lines of what arm_cmn_event_attr_is_visible() is doing for CMN events. AFAICS this would need jevents to grow a rather more flexible way of encoding and matching identifiers, since having dozens of almost-identical copies of event definitions for every exact identifier value is clearly unworkable.
Does anyone happen to have any thoughts or preferences around how that might be approached?