Re: [PATCH] usb: dwc3: gadget: Fix BUG in RT config

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

 



On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan Stern wrote:
> On Mon, 21 Sep 2015, Felipe Balbi wrote:
> 
> > On Mon, Sep 21, 2015 at 10:31:15AM -0400, Alan Stern wrote:
> > > On Mon, 21 Sep 2015, Roger Quadros wrote:
> > > 
> > > > Using spin_lock() in hard irq handler is pointless
> > > > and causes a BUG() in RT (real-time) configuration
> > > > so get rid of it.
> > > 
> > > Wait a minute.  Who says spin_lock is pointless in an IRQ handler?
> > 
> > in the top half IRQs are already disabled, how can this race ?
> 
> It can race with code running on a different CPU.

fair point.

> > > And who says it causes a BUG in RT configurations?
> > 
> > spin_locks are reimplemented as RT-aware mutexes when the RT patch is applied.
> > 
> > > And if those claims are true, why do we have spin_lock in IRQ handlers 
> > > for various host controller drivers?
> > 
> > because they might be wrong too ? :-p Or I'm missing something, but if IRQs
> > are disabled in top half, how can this race ? Unless you're running in a
> > thread without IRQF_ONESHOT.
> 
> I just looked more closely.  The difference is that dwc3 uses a 
> threaded interrupt handler whereas those other drivers don't.

yeah, and we make sure to mask dwc3's interrupts before returning from
the top half.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux