Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v3

From: Joe Perches
Date: Wed Jan 03 2018 - 10:01:44 EST


On Wed, 2018-01-03 at 11:09 +0100, Christian König wrote:
> TTM tries to allocate coherent memory in chunks of 2MB first to improve
> TLB efficiency and falls back to allocating 4K pages if that fails.
>
> Suppress the warning when the 2MB allocations fails since there is a
> valid fall back path.
[]
> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
[]
> @@ -490,11 +490,11 @@ static void swiotlb_bounce(phys_addr_t orig_addr, phys_addr_t tlb_addr,
> }
> }
>
> -phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
> - dma_addr_t tbl_dma_addr,
> - phys_addr_t orig_addr, size_t size,
> - enum dma_data_direction dir,
> - unsigned long attrs)
> +phys_addr_t tbl_map_single(struct device *hwdev,
> + dma_addr_t tbl_dma_addr,
> + phys_addr_t orig_addr, size_t size,
> + enum dma_data_direction dir,
> + unsigned long attrs, bool warn)

shouldn't this be static?