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 ? > 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. -- balbi
Attachment:
signature.asc
Description: PGP signature