[PATCH] x86: make gart_alloc_coherent return zeroed memory

From: Joerg Roedel
Date: Thu Aug 21 2008 - 13:29:00 EST


The dma_alloc_coherent function should return memory set to zero. This patch
adds this to the GART implementation.

Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>
---
arch/x86/kernel/pci-gart_64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 92f5c67..3b5e9e8 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -513,7 +513,7 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,
{
void *vaddr;

- vaddr = (void *)__get_free_pages(flag, get_order(size));
+ vaddr = (void *)__get_free_pages(flag | __GFP_ZERO, get_order(size));
if (!vaddr)
return NULL;

--
1.5.3.7


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/