From: Joerg Roedel Date: Thu, 11 Sep 2008 08:59:15 +0000 (+0200) Subject: AMD IOMMU: replace memset with __GFP_ZERO in alloc_coherent X-Git-Tag: v2.6.28-rc1~712^2^4~20 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c97ac5359e6897abe22770740294dda185bac30d;p=linux-2.6-omap-h63xx.git AMD IOMMU: replace memset with __GFP_ZERO in alloc_coherent Remove the memset and use __GFP_ZERO at allocation time instead. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index e4866660463..f405a61f61f 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -1176,11 +1176,11 @@ static void *alloc_coherent(struct device *dev, size_t size, if (!get_device_resources(dev, &iommu, &domain, &devid)) flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); + flag |= __GFP_ZERO; virt_addr = (void *)__get_free_pages(flag, get_order(size)); if (!virt_addr) return 0; - memset(virt_addr, 0, size); paddr = virt_to_phys(virt_addr); if (!iommu || !domain) {