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
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
Plus then you don't have to rely on PCI_DMA_BUS_IS_PHYS.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/