]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/perf: arm_pmu: rework per-cpu allocation
authorMark Rutland <mark.rutland@arm.com>
Fri, 10 Mar 2017 10:46:13 +0000 (10:46 +0000)
committerWill Deacon <will.deacon@arm.com>
Fri, 31 Mar 2017 17:19:45 +0000 (18:19 +0100)
commit8905d18d4a6f4b5f65a458ad4c38653b9e05886e
tree469b9046143dbf4fd3e13e8e9dbeae9d64f81736
parente9f9030a6c4d2f839500818715b5d8d65e084d42
drivers/perf: arm_pmu: rework per-cpu allocation

For historical reasons, we allocate per-cpu data associated with a PMU
rather late, in cpu_pmu_init, after we've parsed whatever hardware
information we were provided with.

In order to allow use to store some per-cpu data early in the probe
path, we need to allocate (and initialise) the per-cpu data earlier.
This patch reworks the way we allocate the pmu and associated per-cpu
data in order to make that possible.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[will: make armpmu_{alloc,free} static
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/perf/arm_pmu.c