Re: [PATCH] Improve pci_alloc_consistent wrapper on preemptive kernels

From: James Bottomley (James.Bottomley_at_HansenPartnership.com)
Date: 07/30/04

  • Next message: Jesse Barnes: "Re: Exposing ROM's though sysfs"
    To: Andrew Morton <akpm@osdl.org>
    Date:	30 Jul 2004 16:28:26 -0400
    
    

    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Jesse Barnes: "Re: Exposing ROM's though sysfs"

    Relevant Pages