Re: pci_pool_free from IRQ

David Brownell (david-b@pacbell.net)
Tue, 08 May 2001 20:09:46 -0700


> > Pete's patch to pci_pool_free() is fine with me, and I'd be glad
> > to see that bit of pci interface cleaned up. Any changes needed
> > other than the pci.txt doc update?
>
> Ummm... What Alan's saying is:

(consistent with what I said -- those are two separate issues!)

> 1) Whatever driver is trying to shut down from IRQ context
> is broken must be fixed. pci_pool is fine.

In _that_ respect, yes. pci_pool_destroy() called in shutdown
context "should" be OK. Getting rid of pages then is fine.

> 2) The Documentation/ files which suggest that such device
> removal from IRQs is "OK" must be fixed because it is not
> "OK" to handle device removal from IRQ context.

All agreed.

> So Pete's change is not needed. A fix for the documentation and
> broken drivers is needed instead.

Two issues are mixed up there. Doc should address both:

Documentation/pci.txt

... that remove() is never called in_interrupt
point (2) above

Documentation/DMA-mapping.txt

pci_free_consistent() -- do not call in_interrupt
... unless we bugfix the ARM behavior "soon"

pci_pool_destroy() -- do not call in_interrupt
... normally called on device remove()

pci_pool_free() -- may be called in_interrupt
... often called in device interrupt handling

Pete's patch deferred some pci_free_consistent calls from
pci_pool_free() where they're unsafe (on ARM) to where
they're safe (all architectures, as discussed above).

- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/