Re: [PATCH] generic device DMA (dma_pool update)

James Bottomley
2002-12-31T19:42:33Z

david-b@pacbell.net said:
> You didn't make anything store or return the dma_addr_t ... that was
> the issue I was referring to, it's got to be either (a) passed up from
> the very lowest level, like the pci_*() calls assume, or else (b)
> cheaply derived from the virtual address. My patch added slab support
> in common cases where (b) applies.

That's fairly simply done as part of the wrappers: The allocator stores the
vaddr, paddr and size in a hash table. Thus, the paddr can be deduced when
kmem_cache_alloc is called by the allocation wrapper using the linearity
property.

I've got to say though that the most sensible course of action is still to
generalise pci_pool, which can be done easily and safely. I think replacing
it with a slab based scheme is probably a 2.7 thing.

James