diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-09-11 04:59:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-19 06:59:25 -0400 |
commit | c97ac5359e6897abe22770740294dda185bac30d (patch) | |
tree | 30cbf63339f16f80f1910fa72f5bd333e744427c /arch/x86/kernel/amd_iommu.c | |
parent | 13d9fead3daa0efa1b8bb6ae59650e4453b39128 (diff) |
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 <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index e4866660463e..f405a61f61fc 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, | |||
1176 | if (!get_device_resources(dev, &iommu, &domain, &devid)) | 1176 | if (!get_device_resources(dev, &iommu, &domain, &devid)) |
1177 | flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); | 1177 | flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); |
1178 | 1178 | ||
1179 | flag |= __GFP_ZERO; | ||
1179 | virt_addr = (void *)__get_free_pages(flag, get_order(size)); | 1180 | virt_addr = (void *)__get_free_pages(flag, get_order(size)); |
1180 | if (!virt_addr) | 1181 | if (!virt_addr) |
1181 | return 0; | 1182 | return 0; |
1182 | 1183 | ||
1183 | memset(virt_addr, 0, size); | ||
1184 | paddr = virt_to_phys(virt_addr); | 1184 | paddr = virt_to_phys(virt_addr); |
1185 | 1185 | ||
1186 | if (!iommu || !domain) { | 1186 | if (!iommu || !domain) { |