aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/pmu.h
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2014-05-13 19:46:10 +0100
committerWill Deacon <will.deacon@arm.com>2014-10-30 12:17:00 +0000
commit5ebd92003494a19ac5246ae385c073be16de1144 (patch)
tree8c9367b21854ea92a92a355978523a33abf48a3c /arch/arm/include/asm/pmu.h
parentarm: perf: kill get_hw_events() (diff)
downloadlinux-dev-5ebd92003494a19ac5246ae385c073be16de1144.tar.xz
linux-dev-5ebd92003494a19ac5246ae385c073be16de1144.zip
arm: perf: fold percpu_pmu into pmu_hw_events
Currently the percpu_pmu pointers used as percpu_irq dev_id values are defined separately from the other per-cpu accounting data, which make dynamically allocating the data (as will be required for systems with heterogeneous CPUs) difficult. This patch moves the percpu_pmu pointers into pmu_hw_events (which is itself allocated per cpu), which will allow for easier dynamic allocation. Both percpu and regular irqs are requested using percpu_pmu pointers as tokens, freeing us from having to know whether an irq is percpu within the handler, and thus avoiding a radix tree lookup on the handler path. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Tested-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/include/asm/pmu.h')
-rw-r--r--arch/arm/include/asm/pmu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h
index f273dd2285a1..cc0149835507 100644
--- a/arch/arm/include/asm/pmu.h
+++ b/arch/arm/include/asm/pmu.h
@@ -81,6 +81,12 @@ struct pmu_hw_events {
* read/modify/write sequences.
*/
raw_spinlock_t pmu_lock;
+
+ /*
+ * When using percpu IRQs, we need a percpu dev_id. Place it here as we
+ * already have to allocate this struct per cpu.
+ */
+ struct arm_pmu *percpu_pmu;
};
struct arm_pmu {