]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
arm64: perf: condense event number maps
authorMark Rutland <mark.rutland@arm.com>
Tue, 21 Jul 2015 10:36:39 +0000 (11:36 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:40 +0000 (11:08 +0100)
commitae2fb7ece973f0b285f41985f5de85c57df9bf5a
tree99460866f7e3a7ae6b59982f6cff94defcc71d66
parent0a570e7adeeae28892e60bc919c7dcf011815134
arm64: perf: condense event number maps

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: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/perf_event.c