>>>>> On Fri, 06 Jun 2003 23:44:01 -0700 (PDT), "David S. Miller" <davem@redhat.com> said:
DaveM> But on an IOMMU system, we could end up mapping to the same
DaveM> bogus DMA address.
Ah, yes, just changing the buffer address doesn't guarantee a
different bus address. I missed that.
DaveM> So we have to solve this problem by keeping the existng bad
DaveM> mapping, doing a new DMA mapping, then trowing away the old
DaveM> one.
But you're creating a new mapping for the old buffer. What if you had
a DMA API implementation which consolidates multiple mapping attempts
of the same buffer into a single mapping entry (along with a reference
count)? That would break the workaround.
Isn't the proper fix to (a) get a new buffer, (b) create a mapping for
the new buffer, (c) destroy the mapping for the old buffer. That
should guarantee a different bus address, no matter what the
DMA-mapping implementation.
Plus then you don't have to rely on PCI_DMA_BUS_IS_PHYS.
--david
-
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/
This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:32 EST