That's a little misleading: all your memory is consistent, the point
is that it is a shadow area of PCI-mappable memory.
> * pci_dma_sync_... just does a memcpy to/from the `shadow' consistent
> memory from/to the drivers kalloc'd block (in principle I think this
> is incorrect, because it uses the `dir' parameter to determine the
> direction to copy, but it works in practice)
>
> So you can see that for this platform, it would be better if drivers
> could _always_ use alloc_consistent, but many don't.
Ah, ok, now I understand. The issue here is actually nothing to do
with consistency, since your platform is fully consistent. The issue
is that there are other constraints for DMAable memory and you want
drivers to be able to easily mallocate with those constraints.
Actually, it occurs to me that PC ISA DMA is in a similar situation -
there is a constraint on DMAable memory (sufficiently low physical
address) which has nothing to do with consistency.
> Yes this is a wierd and frustrating design, but I think it does credit
> to the linux PCI layer that I could get it work at all, without
> modifying any drivers! I guess my main goal in this discussion is to
> ensure that remains the case...
Ok... see also my reply to one of James's posts.
-- David Gibson | For every complex problem there is a david@gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson - 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/