• Mark Rutland's avatar
    arm64: perf: condense event number maps · ae2fb7ec
    Mark Rutland authored
    Most of the cache events an architecture might support do not map well
    to those provided by the ARM architecture, and as such most entries in
    the event number maps are *_UNSUPPORTED. Unfortuantely as 0 is a valid
    physical event identifier, the *_UNSUPPORTED macros expand to a non-zero
    value and thus each unsupported event must be explicitly initialised as
    such. This leads to large diffs when adding support for a new CPU, and
    makes it difficult to spot the important information.
    
    This patch follows arch/arm/ in making use of PERF_*_ALL_UNSUPPORTED
    macros to initialise all entries to *_UNSUPPORTED before overriding this
    for the specific events we actually support, resulting in a significant
    source code reduction.
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    ae2fb7ec
perf_event.c 32.3 KB