Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-28 Thread Thomas Gleixner
On Tue, 25 Aug 2015, Felipe Balbi wrote: > Hi Ingo, Thanks for not cc'ing the irq maintainer > I'm facing an issue with CONFIG_DEBUG_SHIRQ and pm_runtime when using > devm_request_*irq(). > > If we using devm_request_*irq(), that irq will be freed after device > drivers' ->remove() gets ca

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-27 Thread Felipe Balbi
On Wed, Aug 26, 2015 at 05:36:24PM -0300, Ezequiel Garcia wrote: > On 26 August 2015 at 17:24, Felipe Balbi wrote: > [..] > >> > >> static irqreturn_t tw68_irq(int irq, void *dev_id) > >> { > >> struct tw68_dev *dev = dev_id; > >> u32 status, orig; > >> int loop; > >> > >>

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-26 Thread Ezequiel Garcia
On 26 August 2015 at 17:24, Felipe Balbi wrote: [..] >> >> static irqreturn_t tw68_irq(int irq, void *dev_id) >> { >> struct tw68_dev *dev = dev_id; >> u32 status, orig; >> int loop; >> >> status = orig = tw_readl(TW68_INTSTAT) & dev->pci_irqmask; > > Now try to rea

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-26 Thread Felipe Balbi
Hi, On Wed, Aug 26, 2015 at 05:15:51PM -0300, Ezequiel Garcia wrote: > >> be prepared to handle it any time, coming from any sources (not only > >> your device). And CONFIG_DEBUG_SHIRQ does exactly that, in order to > >> make sure all the drivers passing IRQF_SHARED comply with that rule. > > >

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-26 Thread Ezequiel Garcia
On 26 August 2015 at 17:03, Felipe Balbi wrote: > On Wed, Aug 26, 2015 at 04:53:27PM -0300, Ezequiel Garcia wrote: >> On 26 August 2015 at 16:38, Felipe Balbi wrote: >> > Hi, >> > >> > On Wed, Aug 26, 2015 at 04:29:52PM -0300, Ezequiel Garcia wrote: >> >> Felipe, >> >> >> >> On 25 August 2015 at

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-26 Thread Felipe Balbi
On Wed, Aug 26, 2015 at 04:53:27PM -0300, Ezequiel Garcia wrote: > On 26 August 2015 at 16:38, Felipe Balbi wrote: > > Hi, > > > > On Wed, Aug 26, 2015 at 04:29:52PM -0300, Ezequiel Garcia wrote: > >> Felipe, > >> > >> On 25 August 2015 at 16:58, Felipe Balbi wrote: > >> > Hi Ingo, > >> > > >> >

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-26 Thread Ezequiel Garcia
On 26 August 2015 at 16:38, Felipe Balbi wrote: > Hi, > > On Wed, Aug 26, 2015 at 04:29:52PM -0300, Ezequiel Garcia wrote: >> Felipe, >> >> On 25 August 2015 at 16:58, Felipe Balbi wrote: >> > Hi Ingo, >> > >> > I'm facing an issue with CONFIG_DEBUG_SHIRQ and pm_runtime when using >> > devm_reque

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-26 Thread Felipe Balbi
Hi, On Wed, Aug 26, 2015 at 04:29:52PM -0300, Ezequiel Garcia wrote: > Felipe, > > On 25 August 2015 at 16:58, Felipe Balbi wrote: > > Hi Ingo, > > > > I'm facing an issue with CONFIG_DEBUG_SHIRQ and pm_runtime when using > > devm_request_*irq(). > > > > I may be jumping on the gun here, but I

Re: CONFIG_DEBUG_SHIRQ and PM

2015-08-26 Thread Ezequiel Garcia
Felipe, On 25 August 2015 at 16:58, Felipe Balbi wrote: > Hi Ingo, > > I'm facing an issue with CONFIG_DEBUG_SHIRQ and pm_runtime when using > devm_request_*irq(). > I may be jumping on the gun here, but I believe here's your problem. Using devm_request_irq with shared IRQs is not a good idea.

CONFIG_DEBUG_SHIRQ and PM

2015-08-25 Thread Felipe Balbi
Hi Ingo, I'm facing an issue with CONFIG_DEBUG_SHIRQ and pm_runtime when using devm_request_*irq(). If we using devm_request_*irq(), that irq will be freed after device drivers' ->remove() gets called. If on ->remove(), we're calling pm_runtime_put_sync(); pm_runtime_disable(), device's clocks mi