Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-12 Thread Benjamin Herrenschmidt
On Tue, 2013-02-12 at 17:18 +1100, Michael Ellerman wrote: > > I don't think you can, "active" is not well defined. Other code may have > done nothing other than create the mapping and remembered the virq, > which will break if you destroy the mapping. Or? Active as in "requested". Yes there's a

Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-11 Thread Michael Ellerman
On Tue, Feb 12, 2013 at 11:51:13AM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2013-02-11 at 20:52 +, Grant Likely wrote: > > Really the irq mappings should be using reference counting. The existing > > code is naive on this count and just releases the irq on the first call > > to irq_dispos

Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-11 Thread Benjamin Herrenschmidt
On Mon, 2013-02-11 at 20:52 +, Grant Likely wrote: > Really the irq mappings should be using reference counting. The existing > code is naive on this count and just releases the irq on the first call > to irq_dispose_mapping(). I've not gotten around to fixing that. Anyone > want to take that

Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-11 Thread Grant Likely
On Mon, 11 Feb 2013 17:19:49 +1100, Michael Ellerman wrote: > On Mon, Feb 11, 2013 at 07:31:00AM +0200, Baruch Siach wrote: > > Hi lkml, > > Hi Baruch, > > > The drivers/edac/mpc85xx_edac.c driver contains the following (abbreviated) > > code snippet it its .probe: > > You dropped an important

Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-10 Thread Baruch Siach
Hi Michael, On Mon, Feb 11, 2013 at 05:19:49PM +1100, Michael Ellerman wrote: > On Mon, Feb 11, 2013 at 07:31:00AM +0200, Baruch Siach wrote: [...] > > mpc85xx_pci_err_probe: Unable to requiest irq 16 for MPC85xx PCI err > While you're there, can you fix the typo :) The patch fixing it is alrea

Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-10 Thread Michael Ellerman
On Mon, Feb 11, 2013 at 07:31:00AM +0200, Baruch Siach wrote: > Hi lkml, Hi Baruch, > The drivers/edac/mpc85xx_edac.c driver contains the following (abbreviated) > code snippet it its .probe: You dropped an important detail which is the preceeding line: pdata->irq = irq_of_parse_and_map

[BUG] irq_dispose_mapping after irq request failure

2013-02-10 Thread Baruch Siach
Hi lkml, The drivers/edac/mpc85xx_edac.c driver contains the following (abbreviated) code snippet it its .probe: res = devm_request_irq(&op->dev, pdata->irq, mpc85xx_pci_isr, IRQF_DISABLED, "[EDAC] PCI e