OSDN Git Service

arm: perf: fold percpu_pmu into pmu_hw_events
authorMark Rutland <mark.rutland@arm.com>
Tue, 13 May 2014 18:46:10 +0000 (19:46 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 30 Oct 2014 12:17:00 +0000 (12:17 +0000)
commit5ebd92003494a19ac5246ae385c073be16de1144
tree8c9367b21854ea92a92a355978523a33abf48a3c
parent116792508607002896b706fbad8310419fcc5742
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>
arch/arm/include/asm/pmu.h
arch/arm/kernel/perf_event.c
arch/arm/kernel/perf_event_cpu.c