Re: problem with blk_queue_bounce_limit()

David S. Miller (davem@redhat.com)
Fri, 06 Jun 2003 00:32:30 -0700 (PDT)


From: David Mosberger <davidm@napali.hpl.hp.com>
Date: Fri, 6 Jun 2003 00:19:08 -0700

PCI_DMA_BUS_IS_PHYS (and it's description) is quite misleading: it
claims that it has something to do with there being an equivalence
between PCI bus and physical addresses. That's actually the case for
(small) ia64 platforms so that's why we ended up setting it to 1.

It does have to do with such an equivalence. If your port couldn't
work if drivers use the deprecated virt_to_bus/bus_to_virt, you must
set PCI_DMA_BUS_IS_PHYS to zero.

The whole block layer makes all kinds of assumptions about what
physically contiguous addresses mean about how they'll be contiguous
in the bus addresses the device will actually use to perform the
DMA transfer.

Likewise, when PCI_DMA_BUS_IS_PHYS is zero, it knows that many
IOMMU'ish things can occur such as taking non-physically-contiguous
pages and mapping them using the IOMMU to create bus-contiguous
mappings.

We could convert the few compile time checks of PCI_DMA_BUS_IS_PHYS
so that you can set this based upon the configuration of the machine
if for some configurations it is true. drivers/net/tg3.c is the
only offender, my bad :-)
-
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/