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. > > 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. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html