diff options
| author | Neil Leeder <nleeder@codeaurora.org> | 2014-08-29 15:55:59 -0400 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:58:13 -0700 |
| commit | 182eeb0c0daf70acd8ebf739f77078f0c9425540 (patch) | |
| tree | ac5d1c624125f8a9bb46f221ed10c8d8bcd69b15 /include/linux | |
| parent | 6470f7956ac6b479a1697e567a47bebd90095bb2 (diff) | |
Perf: arm64: stop counters when going into hotplug
Hotplug disables the pmu irq, but if counters are
running in the window before the CPU is hotplugged off
they can overflow and generate an interrupt. Because the
interrupt is disabled, this prevents the cpu from going
down.
Events are stopped during hotplug processing. However,
perf is hooked into the timer tick, and restarts enabled
events on every tick, even if they were stopped. Change
the event state to OFF to prevent this.
CPUs can still be power-collapsed while being hotplugged
off, but hotplug processing will save and restore the correct
state, so don't process power-collapse save/restore while
hotplug is in process.
Processing for stop reads the counters, so a separate call
is no longer needed. Start processing re-enables events so
the from_idle flag is not needed during pmu_enable.
Change-Id: I6a7f5b04955ebba8c4d76547f24e2be4071d7539
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: merge conflict resolution and move changes in
arch/arm64/kernel/perf_event.c to drivers/perf/arm_pmu.c
to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/perf_event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 95fd207e63ca..a9cc2b530409 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -471,6 +471,7 @@ struct perf_event { struct pmu *pmu; enum perf_event_active_state state; + enum perf_event_active_state hotplug_save_state; unsigned int attach_state; local64_t count; atomic64_t child_count; |
