Revert "iommu/amd: Don't allocate with __GFP_ZERO in alloc_coherent"
This reverts commit 5fc872c732
.
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>
This commit is contained in:
Родитель
c65b99f046
Коммит
2d0ec7a19b
|
@ -2930,6 +2930,7 @@ static void *alloc_coherent(struct device *dev, size_t size,
|
|||
size = PAGE_ALIGN(size);
|
||||
dma_mask = dev->coherent_dma_mask;
|
||||
flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
|
||||
flag |= __GFP_ZERO;
|
||||
|
||||
page = alloc_pages(flag | __GFP_NOWARN, get_order(size));
|
||||
if (!page) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче