dma-mapping: clear harmful GFP_* flags in common code

Lift the code from x86 so that we behave consistently.  In the future we
should probably warn if any of these is set.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Jesper Nilsson <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]> [m68k]
This commit is contained in:
Christoph Hellwig 2017-12-22 16:05:15 +01:00
commit 57bf5a8963
12 changed files with 7 additions and 31 deletions

View file

@ -22,9 +22,6 @@ static void *v32_dma_alloc(struct device *dev, size_t size,
{
void *ret;
/* ignore region specifiers */
gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
gfp |= GFP_DMA;