Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-07 Thread Yanmin Zhang
On Fri, 2013-06-07 at 08:08 -0700, Greg KH wrote: > On Fri, Jun 07, 2013 at 12:54:55PM +0800, Yanmin Zhang wrote: > > On Thu, 2013-06-06 at 21:19 -0700, Greg KH wrote: > > > On Fri, Jun 07, 2013 at 11:18:06AM +0800, Yanmin Zhang wrote: > > > > On Thu, 2013-06-06 at 20:08 -0700, Greg KH wrote: > > >

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-07 Thread Greg KH
On Fri, Jun 07, 2013 at 12:54:55PM +0800, Yanmin Zhang wrote: > On Thu, 2013-06-06 at 21:19 -0700, Greg KH wrote: > > On Fri, Jun 07, 2013 at 11:18:06AM +0800, Yanmin Zhang wrote: > > > On Thu, 2013-06-06 at 20:08 -0700, Greg KH wrote: > > > > On Fri, Jun 07, 2013 at 10:37:52AM +0800, Yanmin Zhang

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Yanmin Zhang
On Thu, 2013-06-06 at 21:19 -0700, Greg KH wrote: > On Fri, Jun 07, 2013 at 11:18:06AM +0800, Yanmin Zhang wrote: > > On Thu, 2013-06-06 at 20:08 -0700, Greg KH wrote: > > > On Fri, Jun 07, 2013 at 10:37:52AM +0800, Yanmin Zhang wrote: > > > > On Thu, 2013-06-06 at 18:02 -0700, Greg KH wrote: > > >

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Greg KH
On Fri, Jun 07, 2013 at 11:18:06AM +0800, Yanmin Zhang wrote: > On Thu, 2013-06-06 at 20:08 -0700, Greg KH wrote: > > On Fri, Jun 07, 2013 at 10:37:52AM +0800, Yanmin Zhang wrote: > > > On Thu, 2013-06-06 at 18:02 -0700, Greg KH wrote: > > > > On Fri, Jun 07, 2013 at 08:53:29AM +0800, Yanmin Zhang

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Yanmin Zhang
On Thu, 2013-06-06 at 20:08 -0700, Greg KH wrote: > On Fri, Jun 07, 2013 at 10:37:52AM +0800, Yanmin Zhang wrote: > > On Thu, 2013-06-06 at 18:02 -0700, Greg KH wrote: > > > On Fri, Jun 07, 2013 at 08:53:29AM +0800, Yanmin Zhang wrote: > > > > On Thu, 2013-06-06 at 15:18 +0200, Thomas Gleixner wrot

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Greg KH
On Fri, Jun 07, 2013 at 10:37:52AM +0800, Yanmin Zhang wrote: > On Thu, 2013-06-06 at 18:02 -0700, Greg KH wrote: > > On Fri, Jun 07, 2013 at 08:53:29AM +0800, Yanmin Zhang wrote: > > > On Thu, 2013-06-06 at 15:18 +0200, Thomas Gleixner wrote: > > > > On Thu, 6 Jun 2013, shuox@intel.com wrote:

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Yanmin Zhang
On Thu, 2013-06-06 at 18:02 -0700, Greg KH wrote: > On Fri, Jun 07, 2013 at 08:53:29AM +0800, Yanmin Zhang wrote: > > On Thu, 2013-06-06 at 15:18 +0200, Thomas Gleixner wrote: > > > On Thu, 6 Jun 2013, shuox@intel.com wrote: > > > > From: Zhang Yanmin > > > > > > > > synchronize_irq waits pen

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Greg KH
On Fri, Jun 07, 2013 at 08:53:29AM +0800, Yanmin Zhang wrote: > On Thu, 2013-06-06 at 15:18 +0200, Thomas Gleixner wrote: > > On Thu, 6 Jun 2013, shuox@intel.com wrote: > > > From: Zhang Yanmin > > > > > > synchronize_irq waits pending IRQ handlers to be finished. If using this > > > function

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Yanmin Zhang
On Thu, 2013-06-06 at 15:18 +0200, Thomas Gleixner wrote: > On Thu, 6 Jun 2013, shuox@intel.com wrote: > > From: Zhang Yanmin > > > > synchronize_irq waits pending IRQ handlers to be finished. If using this > > function while holding a resource, the IRQ handler may cause deadlock. > > > > He

Re: [PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread Thomas Gleixner
On Thu, 6 Jun 2013, shuox@intel.com wrote: > From: Zhang Yanmin > > synchronize_irq waits pending IRQ handlers to be finished. If using this > function while holding a resource, the IRQ handler may cause deadlock. > > Here we add a new function irq_in_progress which doesn't wait for the hand

[PATCH] irq: add a new function irq_in_progress to check pending IRQ handlers

2013-06-06 Thread shuox . liu
From: Zhang Yanmin synchronize_irq waits pending IRQ handlers to be finished. If using this function while holding a resource, the IRQ handler may cause deadlock. Here we add a new function irq_in_progress which doesn't wait for the handlers to be finished. A typical use case at suspend-to-ram: