OSDN Git Service

arm: perf: limit size of accounting data
authorMark Rutland <mark.rutland@arm.com>
Tue, 13 May 2014 18:08:19 +0000 (19:08 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 30 Oct 2014 12:16:59 +0000 (12:16 +0000)
commita4560846eba60830a444d9e336c8a18f92e099ee
treec1f488dbcf522fd3a561f8fadf226d190d1c739d
parent67b4305aab0fa993d91fa4c6ea2169cfb3f41c93
arm: perf: limit size of accounting data

Commit 3fc2c83087 (ARM: perf: remove event limit from pmu_hw_events) got
rid of the upper limit on the number of events an arm_pmu could handle,
but introduced additional complexity and places a burden on each PMU
driver to allocate accounting data somehow. So far this has not
generally been useful as the only users of arm_pmu are the CPU backend
and the CCI driver.

Now that the CCI driver plugs into the perf subsystem directly, we can
remove some of the complexities that get in the way of supporting
heterogeneous CPU PMUs.

This patch restores the original limits on pmu_hw_events fields such
that the pmu_hw_events data can be allocated as a contiguous block. This
will simplify dynamic pmu_hw_events allocation in later patches.

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