FUJITA Tomonori 03967c5267 x86: restore the old swiotlb alloc_coherent behavior
This restores the old swiotlb alloc_coherent behavior (before the
alloc_coherent rewrite):

  http://lkml.org/lkml/2008/8/12/200

The old alloc_coherent 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. If it fails,
alloc_coherent calls swiotlb_alloc_coherent (in short, we rarely used
swiotlb_alloc_coherent).

After the alloc_coherent rewrite, dma_alloc_coherent
(include/asm-x86/dma-mapping.h) directly calls swiotlb_alloc_coherent.
It means that we possibly can't handle a device having dma_masks >
24bit < 32bits since swiotlb_alloc_coherent doesn't have the above
GFP_DMA retry mechanism.

This patch fixes x86's swiotlb alloc_coherent to use the GFP_DMA retry
mechanism, which dma_generic_alloc_coherent() provides now
(pci-nommu.c and GART IOMMU driver also use
dma_generic_alloc_coherent).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-23 21:54:40 +02:00
..
2008-10-23 00:11:07 -04:00
2008-10-16 16:53:14 +02:00
2008-10-16 16:53:13 +02:00
2008-10-16 09:24:41 -07:00
2008-10-16 09:24:41 -07:00
2008-10-16 16:53:13 +02:00
2008-10-14 10:34:58 +02:00
2008-10-16 16:53:13 +02:00
2008-09-29 10:04:53 +02:00
2008-10-13 10:21:10 +02:00
2008-10-16 16:53:12 +02:00
2008-04-26 17:35:47 +02:00
2008-07-22 14:35:57 +02:00
2008-10-16 16:53:30 +02:00
2008-10-16 16:53:30 +02:00
2008-10-21 15:54:40 +02:00
2008-10-16 16:53:15 +02:00
2008-10-12 12:37:32 +02:00
2008-08-15 08:35:43 -07:00
2008-07-26 12:00:04 -07:00
2008-10-12 12:37:32 +02:00
2008-10-18 14:29:15 +01:00
2008-10-23 00:11:07 -04:00
2008-08-25 12:31:32 +02:00
2008-10-20 08:52:41 -07:00
2008-10-16 16:53:15 +02:00
2008-08-25 10:59:18 +02:00
2008-07-16 12:15:17 -07:00
2008-07-26 16:31:35 +02:00
2008-07-22 14:35:57 +02:00
2008-10-22 22:55:23 -07:00
2008-09-05 17:44:08 +02:00
2008-07-22 14:35:57 +02:00
2008-08-21 10:01:52 +02:00
2008-10-16 16:53:13 +02:00
2008-10-16 16:53:15 +02:00
2008-07-22 14:35:57 +02:00
2008-10-16 16:52:59 +02:00
2008-10-16 16:53:15 +02:00