Re: [PATCH 2/2] mmc: mxs: Use the spinlock irq variants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fabio,

On Fri, 28 Oct 2016 09:40:29 -0200 Fabio Estevam wrote:

> Hi Jisheng,
> 
> On Fri, Oct 28, 2016 at 12:23 AM, Jisheng Zhang <jszhang@xxxxxxxxxxx> wrote:
> 
> > hmm, in interrupt handler the irq is disabled, so IMHO there's no need to
> > use irqsave/irqrestore spinlock variants.  
> 
> Please check Documentation/locking/spinlocks.txt:
> 
> "IFF you know that the spinlocks are
> never used in interrupt handlers, you can use the non-irq versions:"

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.

Thanks,
Jisheng

--
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



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux