]> 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)
commit5e75465fe7ae97def1b50f796ee10094f4e47696
tree99460866f7e3a7ae6b59982f6cff94defcc71d66
parentcf906a86e3d41d7c446619bb0ed24f38008e3339
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