Skip to contentSkip to conversation

generic device DMA implementation

RFC Adam J. Richter 2 participants 2 messages Dec 5, 2002

lore
Share & tools
lore
#0 lore raw

Russell King wrote:
[An excellent explanation of why you sometimes may need consistent memory.]

Quoted 3 lines

In other words, you _will_ loose information in this case, guaranteed. I'd rather keep our existing pci_* API than be forced into this crap again.

All of the proposed API variants that we have discussed in
this thread for pci_alloc_consistent / dma_malloc give you consistent memory (or fail) unless you specifically tell it that returning inconsistent memory is OK.

Adam J. Richter     __     ______________   575 Oroville Road
[email protected]     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

"Free Software For The Rest Of Us."

#1 lore raw
Quoted 11 lines · Adam J. Richter

Russell King wrote:
[An excellent explanation of why you sometimes may need consistent memory.]

Quoted 3 lines

In other words, you _will_ loose information in this case, guaranteed. I'd rather keep our existing pci_* API than be forced into this crap again.

All of the proposed API variants that we have discussed in
this thread for pci_alloc_consistent / dma_malloc give you consistent memory (or fail) unless you specifically tell it that returning inconsistent memory is OK.

How does a driver writer determine if his driver can cope with inconsistent memory? If their view is a 32-byte cache line, and their descriptors are 32 bytes long, they could well say "we can cope with inconsistent memory". When 64 byte cache lines are the norm, the driver magically breaks.

I think we actually want to pass the minimum granularity the driver can cope with if we're going to allocate inconsistent memory. A driver writer does not have enough information to determine on their own whether inconsistent memory is going to be usable on any architecture.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html