KVM: arm64: vgic: Don't acquire the lpi_list_lock in vgic_put_irq()
authorOliver Upton <oliver.upton@linux.dev>
Wed, 21 Feb 2024 05:42:53 +0000 (05:42 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Fri, 23 Feb 2024 21:46:02 +0000 (21:46 +0000)
commite27f2d561fee873d415697e6e5e3ec78efc9c259
treed5a5a60fa10c354122bc3469c48f9bdfec363d6a
parent50ac89bb709275731217f74da8ccef8c99def319
KVM: arm64: vgic: Don't acquire the lpi_list_lock in vgic_put_irq()

The LPI xarray's xa_lock is sufficient for synchronizing writers when
freeing a given LPI. Furthermore, readers can only take a new reference
on an IRQ if it was already nonzero.

Stop taking the lpi_list_lock unnecessarily and get rid of
__vgic_put_lpi_locked().

Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240221054253.3848076-11-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic-its.c
arch/arm64/kvm/vgic/vgic.c
arch/arm64/kvm/vgic/vgic.h