generic device DMA implementation
Quoted 3 lines · James Bottomley
how about
dma_allocto take two flags
DRIVER_SUPPORTS_CONSISTENT_ONLY
It's pretty much impossible not to support consistent memory.
I'd suggest a shorter name for code readability and particularly
to hint that this is the standard usage. I'd suggest DMA_CONSISTENT or "0".
Quoted 3 lines
and
DRIVER_SUPPORTS_NON_CONSISTENT
There is a pretty strong convention for medium to short names
in the kernel, although this name will be used much less, so its length is not as important. I'd like something that would match the names of the corresponding cache flushing and invalidation functions. I think I had previously suggested DMA_MAYBE_CONSISTENT and wmb_maybe or dma_sync_maybe but I'm not that attached to the "maybe" word.
[...]
Quoted 2 lines
and
dma_alloc_consistentto be equivalent todma_allocwithDRIVER_SUPPORTS_CONSISTENT_ONLY(and hence equivalent topci_alloc_consistent)
Why have a separate dma_alloc_consistent function?
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."