arm: perf: Remove PMU locking
authorAnshuman Khandual <anshuman.khandual@arm.com>
Wed, 15 Nov 2023 09:28:04 +0000 (14:58 +0530)
committerWill Deacon <will@kernel.org>
Tue, 5 Dec 2023 12:40:59 +0000 (12:40 +0000)
commit5cd7da19cb9714adbf56054e0a0bd044f49e2a8e
treeb3708b9132af9bb5d6e01a68bced6bf39f819f39
parent38bbef7240b8c5f2dc4493eec356e2efbf2da5f4
arm: perf: Remove PMU locking

Currently the 32-bit arm PMU drivers use the pmu_hw_events::lock spinlock in
their arm_pmu::{start,stop,enable,disable}() callbacks to protect hardware
state and event data.

This locking is not necessary as the perf core code already provides mutual
exclusion, disabling interrupts to serialize against the IRQ handler, and
using perf_event_context::lock to protect against concurrent modifications of
events cross-cpu.

The locking was removed from the arm64 (now PMUv3) PMU driver in commit:

2a0e2a02e4b7 ("arm64: perf: Remove PMU locking")

... and the same reasoning applies to all the 32-bit PMU drivers.

Remove the locking from the 32-bit PMU drivers.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-perf-users@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20231115092805.737822-2-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm/kernel/perf_event_v6.c
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/perf_event_xscale.c