x86: use GFP_DMA for 24bit coherent_dma_mask
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 23 Oct 2008 11:46:55 +0000 (20:46 +0900)
committerIngo Molnar <mingo@elte.hu>
Thu, 23 Oct 2008 19:54:39 +0000 (21:54 +0200)
commit75bebb7f0c2a709812cccb4d3151a21b012c5cad
treedd3a31038904e8b08e4b802830bbc3c746ef78d1
parenta2b89b596c5a0b288adac84b17bdda6bde8d144e
x86: use GFP_DMA for 24bit coherent_dma_mask

dma_alloc_coherent (include/asm-x86/dma-mapping.h) avoids GFP_DMA
allocation first and if the allocated address is not fit for the
device's coherent_dma_mask, then dma_alloc_coherent does GFP_DMA
allocation. This is because dma_alloc_coherent avoids precious GFP_DMA
zone if possible. This is also how the old dma_alloc_coherent
(arch/x86/kernel/pci-dma.c) works.

However, if the coherent_dma_mask of a device is 24bit, there is no
point to go into the above GFP_DMA retry mechanism. We had better use
GFP_DMA in the first place.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/dma-mapping.h