diff options
author | Christoph Hellwig <hch@lst.de> | 2017-12-22 16:05:15 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-01-15 09:34:55 +0100 |
commit | 57bf5a8963f80fb3828c46c3e3a5b2dd790e09a7 (patch) | |
tree | 17ccc31f02cbc09c8a51c8b95acf50f0b62e366b /arch/x86/kernel/pci-dma.c | |
parent | dma-mapping: warn when there is no coherent_dma_mask (diff) | |
download | linux-57bf5a8963f80fb3828c46c3e3a5b2dd790e09a7.tar.xz linux-57bf5a8963f80fb3828c46c3e3a5b2dd790e09a7.zip |
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 <hch@lst.de>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
Diffstat (limited to 'arch/x86/kernel/pci-dma.c')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 8439e6de6156..61a8f1cb3829 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -87,7 +87,6 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size, dma_mask = dma_alloc_coherent_mask(dev, flag); - flag &= ~__GFP_ZERO; again: page = NULL; /* CMA can be used only in the context which permits sleeping */ @@ -139,7 +138,6 @@ bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp) if (!*dev) *dev = &x86_dma_fallback_dev; - *gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp); if (!is_device_dma_capable(*dev)) |