Skip to content
Commit dd685a91 authored by Julien Thierry's avatar Julien Thierry Committed by Alexandru Elisei
Browse files

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: default avatarJulien Thierry <julien.thierry@arm.com>
[Reworded commit message, removed WARN_ONs]
Signed-off-by: Alexandru Elisei's avatarAlexandru 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>
parent 935540a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment