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

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 03:48:53PM -0400, Alan Stern wrote: > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > On Mon, Sep 21, 2015 at 03:01:42PM -0400, Steven Rostedt wrote: > > > On Mon, 21 Sep 2015 12:04:16 -0500 > > > Felipe Balbi wrote: > > > > > > > > > > no, no. you're missing the point he

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

2015-09-21 Thread Steven Rostedt
On Mon, 21 Sep 2015 15:48:53 -0400 (EDT) Alan Stern wrote: > It should say something more along the lines of: > > Top-half handlers for threaded interrupts are not supposed to > acquire any locks. None are needed because the top half is > guaranteed to be mutually exclusive

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

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Felipe Balbi wrote: > On Mon, Sep 21, 2015 at 03:01:42PM -0400, Steven Rostedt wrote: > > On Mon, 21 Sep 2015 12:04:16 -0500 > > Felipe Balbi wrote: > > > > > > > no, no. you're missing the point here. The problem is that when RT > > > is applied, spinlocks get reimplemente

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

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 03:01:42PM -0400, Steven Rostedt wrote: > On Mon, 21 Sep 2015 12:04:16 -0500 > Felipe Balbi wrote: > > > > no, no. you're missing the point here. The problem is that when RT > > is applied, spinlocks get reimplemented as RT-aware mutexes which > > works pretty well as lon

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

2015-09-21 Thread Steven Rostedt
On Mon, 21 Sep 2015 12:04:16 -0500 Felipe Balbi wrote: > no, no. you're missing the point here. The problem is that when RT > is applied, spinlocks get reimplemented as RT-aware mutexes which > works pretty well as long as you don't install your own top and bottom > halves. If you do, RT patch c

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

2015-09-21 Thread Felipe Balbi
Hi, On Mon, Sep 21, 2015 at 09:46:30AM -0700, David Cohen wrote: > On September 21, 2015 9:27:43 AM PDT, Alan Stern > wrote: > >On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > >> On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: > >> > On Mon, 21 Sep 2015, Felipe Balbi wrote: > >> > >

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

2015-09-21 Thread David Cohen
On September 21, 2015 9:27:43 AM PDT, Alan Stern wrote: >On Mon, 21 Sep 2015, Felipe Balbi wrote: > >> On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: >> > On Mon, 21 Sep 2015, Felipe Balbi wrote: >> > >> > > On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan Stern wrote: >> > > > On Mon

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

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Felipe Balbi wrote: > On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: > > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > > > On Mon, Sep 21, 2015 at 10:50:10AM -0400, Alan Stern wrote: > > > > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > > > > > > > On Mon, Sep

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

2015-09-21 Thread Felipe Balbi
On Mon, Sep 21, 2015 at 11:37:47AM -0400, Alan Stern wrote: > On Mon, 21 Sep 2015, Felipe Balbi wrote: > > > 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: > > > >

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

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Felipe Balbi wrote: > 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

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

2015-09-21 Thread Felipe Balbi
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 cau

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

2015-09-21 Thread Alan Stern
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. > > >

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

2015-09-21 Thread Felipe Balbi
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 I

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

2015-09-21 Thread Alan Stern
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? And who says it causes a BUG in RT configurations? And if tho

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

2015-09-21 Thread Roger Quadros
Using spin_lock() in hard irq handler is pointless and causes a BUG() in RT (real-time) configuration so get rid of it. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/gadget.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0c