Skip to contentSkip to conversation

generic device DMA (dma_pool update)

PATCH Adam J. Richter 1 participant 1 message Dec 31, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 15 lines · Andrew Morton
Quoted 14 lines · Adam J. Richter
Quoted 4 lines · David Brownell

struct dma_pool *dma_pool_create(char *, struct device *, size_t) void dma_pool_destroy (struct dma_pool *pool)
void *dma_pool_alloc(struct dma_pool *, int mem_flags, dma_addr_t *) void dma_pool_free(struct dma_pool *, void *, dma_addr_t)

I would like to be able to have failure-free, deadlock-free
blocking memory allocation, such as we have with the non-DMA mempool library so that we can guarantee that drivers that have been successfully initialized will continue to work regardless of memory pressure, and reduce error branches that drivers have to deal with.

Quoted 7 lines
Quoted 5 lines

Such a facility could be layered on top of your interface
perhaps by extending the mempool code to pass an extra parameter around. If so, then you should think about arranging your interface so that it could be driven with as little glue as possible by mempool.

What is that parameter? The size, I assume.

No, dma address. All allocations in a memory pool (in both
the mempool and pci_pool sense) are the same size.

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."