Perf: arm64: fix disable of pmu irq during hotplug
PMU irq is disabled when a cpu is hotplugged off
and perf is running. Using cpu_pmu->active_events
to determine if the pmu is running left a window
where it is decremented to 0 in hw_perf_event_destroy,
and then armpmu_release_hardware is called. If a cpu
is hotplugged off in this window it may not disable
its irq. Use a separate flag which is not cleared
until after the irq is released by all online cpus.
The variable needs to be tristate because of the possibility
of a cpu being hotplugged in during this window. In that
case it should not enable its irq when the pmu is being
shut down. Having the GOING_DOWN state allows correct
behavior for cpus both going down and coming up.
Change-Id: I934ba5dec34e681ce8defd7fa7e311b4a2a92c1a
Signed-off-by:
Neil Leeder <nleeder@codeaurora.org>
Loading
Please register or sign in to comment