> The SWIOTLB version of dma_alloc_coherent allocates all memory with
> GFP_DMA unconditionally. This leads sometimes unnecessary to allocation
> failures. This patch makes the allocation strategy to use the DMA32 zone
> first if this is possible. The changes are boot tested on AMD64 and
> compile tested for i386 and IA64.
>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc:
tony.luck@intel.com
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
> lib/swiotlb.c | 23 +++++++++++++++++------
> 1 files changed, 17 insertions(+), 6 deletions(-)