Hi Jisheng, On Sat, Nov 5, 2016 at 4:56 PM, Fabio Estevam <festevam@xxxxxxxxx> wrote: > Hi Jisheng, > > On Fri, Oct 28, 2016 at 9:49 AM, Jisheng Zhang <jszhang@xxxxxxxxxxx> wrote: > >> This is not the key. The key here is: >> >> compared with the non-irq version, the irq-version spin lock does one extra >> work: disable the local interrupts. But since we are in interrupt handler, >> the local irq is already disabled, so there's no need for the irq-versions. >> >> I'm not sure I understand the situation, comments are welcome. > > Quoting http://www.xml.com/ldd/chapter/book/ch09.html: > > "Many users of spinlocks stick to spin_lock and spin_unlock. If you > are using spinlocks in interrupt handlers, however, you must use the > IRQ-disabling versions (usually spin_lock_irqsave and > spin_unlock_irqsave) in the noninterrupt code. To do otherwise is to > invite a deadlock situation. Ah, after re-reading it several times I agree with you now. It is the noninterrupt code that needs the irq spinlock versions. I will resend the series without this patch. Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html