aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-06-01 11:30:57 -0400
committerJoerg Roedel <jroedel@suse.de>2015-06-02 02:46:32 -0400
commit2d0ec7a19b5796aa958636eeeff072b506460501 (patch)
treef2b9357156dd8332baadb9f10db5e455af7787c7 /drivers/iommu
parentc65b99f046843d2455aa231747b5a07a999a9f3d (diff)
Revert "iommu/amd: Don't allocate with __GFP_ZERO in alloc_coherent"
This reverts commit 5fc872c7323534e8f7dc21bab635e7a9b9659e07. The DMA-API does not strictly require that the memory returned by dma_alloc_coherent is zeroed out. For that another function (dma_zalloc_coherent) should be used. But all other x86 DMA-API implementation I checked zero out the memory, so that some drivers rely on it and break when it is not. It seems the (driver-)world is not yet ready for this change, so revert it. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/amd_iommu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index e43d48956dea..e1c7e9e51045 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -2930,6 +2930,7 @@ static void *alloc_coherent(struct device *dev, size_t size,
2930 size = PAGE_ALIGN(size); 2930 size = PAGE_ALIGN(size);
2931 dma_mask = dev->coherent_dma_mask; 2931 dma_mask = dev->coherent_dma_mask;
2932 flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); 2932 flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
2933 flag |= __GFP_ZERO;
2933 2934
2934 page = alloc_pages(flag | __GFP_NOWARN, get_order(size)); 2935 page = alloc_pages(flag | __GFP_NOWARN, get_order(size));
2935 if (!page) { 2936 if (!page) {