On Mon, 2008-02-25 at 17:54 -0500, Jeff Garzik wrote:
> Matthew Wilcox wrote:
> > On Mon, Feb 25, 2008 at 11:40:35PM +0100, Andi Kleen wrote:
> >>> (I must have fixed it somehow because it works on parisc, which is most
> >>> unforgiving of drivers which do DMA without the DMA API).
> >> At least on x86 the DMA API cannot do ISA bouncing.
> > 
> > You're saying that if I set a 24-bit DMA mask, and then do a
> > pci_alloc_coherent(), x86 might hand me back something that's not
> > accessible?  That would be just broken.
> 
> Indeed.

It's doing the right thing (from pci-dma_32.c):

void *dma_alloc_coherent(struct device *dev, size_t size,
                           dma_addr_t *dma_handle, gfp_t gfp)
[...]
        if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
                gfp |= GFP_DMA;


        ret = (void *)__get_free_pages(gfp, order);


Which correctly allocates the region.

James



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to