Re: [PATCH] irqchip/irq-mtk-sysirq: drop unnecessary spinlock

From: Bartosz Golaszewski
Date: Wed May 27 2020 - 13:06:40 EST


År., 27 maj 2020 o 18:38 Marc Zyngier <maz@xxxxxxxxxx> napisaÅ(a):
>
> Sight... Do you realize that these two locks do not protect the same
> thing at all? One protects the interrupt data, and the other protects
> the MMIO register which is shared between multiple interrupts, and
> on which the driver performs a RMW.
>
> Thanks to the removal of this spinlock, two irq_set_type() can execute
> in parallel and silently corrupt the register. Not exactly an
> improvement.
>

Eek I missed the fact that the internal lock is tied to the chip, not
the interrupt. In that case I'll convert this spinlock to a raw one.

Bart