ARM: 6071/1: perf-events: allow modules to query the number of hardware counters
authorWill Deacon <will.deacon@arm.com>
Fri, 30 Apr 2010 10:34:26 +0000 (11:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 17 May 2010 10:53:58 +0000 (11:53 +0100)
commit929f5199448a67d41bb249d58815ef77bcd53622
treeedb796c49205561ef98abb73f340e900225146dc
parent49e6a32f2f0876b6267584d9c7e0e213bca6e2b8
ARM: 6071/1: perf-events: allow modules to query the number of hardware counters

For OProfile to initialise oprofilefs correctly, it needs to know
the number of counters it can represent.

This patch adds a function to the ARM perf-events backend to return
the number of hardware counters available for the current PMU.

Cc: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/perf_event.h
arch/arm/kernel/perf_event.c