• Anshuman Khandual's avatar
    arm: perf: Remove PMU locking · 5cd7da19
    Anshuman Khandual authored
    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:
    
    2a0e2a02 ("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: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
    Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
    Link: https://lore.kernel.org/r/20231115092805.737822-2-anshuman.khandual@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
    5cd7da19
perf_event_v6.c 17.6 KB