lkml.org 
[lkml]   [2008]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86: make gart_alloc_coherent return zeroed memory
Date
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@amd.com>
---
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



\
 
 \ /
  Last update: 2008-08-21 19:31    [W:0.106 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site