]> git.baikalelectronics.ru Git - kernel.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)
commitc32f0f5ea698a042c4527fc82dfbef57905ba3b8
tree99460866f7e3a7ae6b59982f6cff94defcc71d66
parent744a298082ab7dbfc48da7085b7f222701c76e03
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