Skip to contentSkip to conversation

dma_pool_alloc restrict < 4GB address

DISCUSSION Anil kumar 2 participants 2 messages Nov 12, 2008 – Nov 13, 2008 SCSI

lore
Share & tools
lore

Anil kumar

author
#0 lore raw

Hi,

Is there anyway to restrict the returned bus address(dma address) from dma_poll_alloc to < 4GB ? The function returns a dma address(of type dma_addr_t). Is there anyway I can ensure to restrict it to < 4B address. I guess we can do that in pci_alloc_consistent as by default it returns 32bit address.

with regards,
Anil

#1 lore raw
Quoted 3 lines · Anil kumar

Is there anyway to restrict the returned bus address(dma address) from dma_poll_alloc to < 4GB ? The function returns a dma address(of type dma_addr_t). Is there anyway I can ensure to restrict it to < 4B address. I guess we can do that in pci_alloc_consistent as by default it returns 32bit address.

dma_pool_alloc (as described in the documentation ...) allocates memory using dma_alloc_coherent(). As long as you've set the coherent mask to 32-bit (or left it alone, since it's 32-bit by default ...), you'll get 32-bit dma addresses back.

Signature · 4 lines
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."