Re: [linux-usb-devel] RT-friendly IRQ management in USB

2007-07-03 Thread Steven Rostedt
Alan Stern wrote: > On Tue, 3 Jul 2007, Steven Rostedt wrote: > > You never answered my second question. Is this sort of thing > acceptable? Doh! I never noticed your second question. Sorry about that. > > DECLARE_SPINLOCK(lock); > > static void irq_handler() >

Re: [linux-usb-devel] RT-friendly IRQ management in USB

2007-07-03 Thread Steven Rostedt
Jiri Kosina wrote: > On Tue, 3 Jul 2007, Steven Rostedt wrote: > >> Unfortunately that would not work in the RT case either. Because in RT, >> that spin_lock can schedule, and we are not allowed to schedule with >> interrupts disabled. > > So how do you han

Re: [linux-usb-devel] RT-friendly IRQ management in USB

2007-07-03 Thread Steven Rostedt
Jiri Kosina wrote: > On Tue, 3 Jul 2007, Felipe Balbi wrote: > >> So looks like we don't have (yet) a way to make it work nicely in both >> cases... does anyone has a clue about how to implement this one?? > > You of course still can > > local_irq_save(flags); > spin_lock(&some_lock

Re: [linux-usb-devel] RT-friendly IRQ management in USB

2007-07-02 Thread Steven Rostedt
Alan Cox wrote: >> The reason for doing this is historical; usb_hcd_giveback_urb() is >> documented as running with local IRQs disabled, and many drivers depend >> on that. For example, their callback routines invoked by >> usb_hcd_giveback_urb do spin_lock() instead of spin_lock_irqsave(). > >