[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130731113244.GI2810@htj.dyndns.org>
Date: Wed, 31 Jul 2013 07:32:44 -0400
From: Tejun Heo <htejun@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Peter Chen <peter.chen@...escale.com>,
Fabio Estevam <festevam@...il.com>,
alexander.shishkin@...ux.intel.com, kernel@...gutronix.de,
linux-usb@...r.kernel.org,
Fabio Estevam <fabio.estevam@...escale.com>,
Jeff Garzik <jeff@...zik.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Mike Turquette <mturquette@...aro.org>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/2] chipidea: Use devm_request_irq()
Hello,
On Wed, Jul 31, 2013 at 12:18:53PM +0100, Mark Brown wrote:
> I'm not sure I understand how this relates the problem. The main issue
> here is that for the shared IRQ case quiescing the device doesn't make
> any difference since one of the other users of the interrupt could cause
> the interrupt handler to be called regardless of what the hardware is
> doing. This means that we need to guarantee that anything the interrupt
> handler relies on has not been deallocated before the interrupt handler
> is unregistered.
Yeah, if all resources are allocated using devm - note that you can
hook in non-devm resources using devres_alloc() - all resources which
would be necessary for the interrupt handler would have been allocated
before the irq was allocated, right? And thus they'll of course
released after the IRQ is freed. The problem arises when devm and
non-devm releases are mixed as non-devm ones would happen before all
devm ones messing up the release sequencing.
> OK, that's helpful. It'd be good to document this if it's something
> the API is intending to guarantee, though - devres.txt doesn't mention
Oh, it's definitely guaranteed. Nothing would work otherwise.
> this and it's not something I'd intuitively expect to be the case.
Oops... I guess I forgot to mention that. Care to submit a patch?
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists