arm64: perf: Remove PMU locking
The PMU counters are programmed from different places: * From the core perf code, with interrupts or preemption disabled * From the CPU PM notifiers, which are called with interrupts disabled. Just like the counters, the PMU is disabled or enabled from the perf core code from contexts where preemption is always disabled. The functions to toggle the PMU on or off, and the functions to program the PMU counters access the registers directly and don't access data modified by the interrupt handler. That, and the fact that they're always called from non-preemptible contexts, means that we don't need to disable interrupts or use a spinlock. Signed-off-by:Julien Thierry <julien.thierry@arm.com> [Reworded commit message, removed WARN_ONs] Signed-off-by:
Alexandru Elisei <alexandru.elisei@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com>
Loading
Please register or sign in to comment