linux_dsm_epyc7002/drivers/perf
Mark Rutland c09adab01e 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>
2017-03-31 18:20:29 +01:00
..
arm_pmu.c drivers/perf: arm_pmu: split irq request from enable 2017-03-31 18:20:29 +01:00
Kconfig perf: add qcom l2 cache perf events driver 2017-02-08 19:32:24 +00:00
Makefile perf: add qcom l2 cache perf events driver 2017-02-08 19:32:24 +00:00
qcom_l2_pmu.c perf: add qcom l2 cache perf events driver 2017-02-08 19:32:24 +00:00
xgene_pmu.c perf: xgene: Include module.h 2017-02-03 18:46:47 +00:00