Re: [PATCH] Improve pci_alloc_consistent wrapper on preemptivekernels

From: James Bottomley
Date: Fri Jul 30 2004 - 15:37:32 EST


On Fri, 2004-07-30 at 16:20, Andrew Morton wrote:
> Sounds sane. But the default version in asm-generic/dma-mapping.h needs to
> be fixed up:
>
> static inline void *
> dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
> int flag)
> {
> BUG_ON(dev->bus != &pci_bus_type);
>
> return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle);
> }
>
> If we stick with this model, we'll still need a new pci_alloc_consistent_gfp().

Theoretically, that was just to help architectures that didn't want to
implement the dma_ functions. If we make dma_alloc_coherent() the
preferred implementation, we just remove this because now all arch's
will have to implement dma_alloc_coherent anyway.

James


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