summaryrefslogtreecommitdiff
path: root/Documentation/perf
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2017-03-10 10:46:15 +0000
committerWill Deacon <will.deacon@arm.com>2017-03-31 18:20:29 +0100
commitc09adab01e4aeecfa3dfae0946409844400c5901 (patch)
treee8421a72c4547b0a573219579fa3c63eec16855e /Documentation/perf
parent7ed98e0168bd23d8ea3294e95254cc5b4000c948 (diff)
downloadlwn-c09adab01e4aeecfa3dfae0946409844400c5901.tar.gz
lwn-c09adab01e4aeecfa3dfae0946409844400c5901.zip
drivers/perf: arm_pmu: split irq request from enable
For historical reasons, we lazily request and free interrupts in the arm pmu driver. This requires us to refcount use of the pmu (by way of counting the active events) in order to request/free interrupts at the correct times, which complicates the driver somewhat. The existing logic is flawed, as it only considers currently online CPUs when requesting, freeing, or managing the affinity of interrupts. Intervening hotplug events can result in erroneous IRQ affinity, online CPUs for which interrupts have not been requested, or offline CPUs whose interrupts are still requested. To fix this, this patch splits the requesting of interrupts from any per-cpu management (i.e. per-cpu enable/disable, and configuration of cpu affinity). We now request all interrupts up-front at probe time (and never free them, since we never unregister PMUs). The management of affinity, and per-cpu enable/disable now happens in our cpu hotplug callback, ensuring it occurs consistently. This means that we must now invoke the CPU hotplug callback at boot time in order to configure IRQs, and since the callback also resets the PMU hardware, we can remove the duplicate reset in the probe path. This rework renders our event refcounting unnecessary, so this is removed. Signed-off-by: Mark Rutland <mark.rutland@arm.com> [will: make armpmu_get_cpu_irq static] Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'Documentation/perf')
0 files changed, 0 insertions, 0 deletions