Skip to contentSkip to conversation

aic7xxx (O2 scsi) DMA coherency

DISCUSSION Vivien Chappelier 1 participant 1 message Jan 4, 2002 1 message not in the archive MIPS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 5 lines · Ilya Volynets

On Friday 04 January 2002 11:33 am, you wrote:
This is true in theory. In practice you have to look at kmalloc implementation and how it uses GFP_DMA. I don't remember anything arch specific in there, but I never seriously dug in that part. I believe it doesn't do what we need, otherwice We'd be using it for pci_alloc_consistent.

Well, both pci_alloc_consistent and kmalloc will end up calling __get_free_pages, with the GFP_DMA flag set. On setup, with the MIPS64 arch, DMA memory is set to start in non-cacheable space (don't know how). So both pci_alloc_consistent and kmalloc(GFP_DMA,...) will return DMA safe (i.e. non cacheable) memory.
see mm/slab.c (for kmalloc and how it finally calls __get_free_pages).

regards,
Vivien Chappelier.