Skip to contentSkip to conversation

dma-mapping: remove a pointless memset in dma_atomic_pool_init

PATCH In review Christoph Hellwig 1 participant 2 messages Dec 4, 2018 – Dec 10, 2018 1 message not in the archive DMA mapping helpers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma-mapping: remove a pointless memset in dma_atomic_pool_init

We already zero the memory after allocating it from the pool that this function fills, and having the memset here in this form means we can't support CMA highmem allocations.

---
 kernel/dma/remap.c | 1 -
 1 file changed, 1 deletion(-)
kernel/dma/remap.c +0 -1
index 68a64e3ff6a1..6e784824326f 100644
@@ -121,7 +121,6 @@ int __init dma_atomic_pool_init(gfp_t gfp, pgprot_t prot)
 	if (!page)
 		goto out;
 
-	memset(page_address(page), 0, atomic_pool_size);
 	arch_dma_prep_coherent(page, atomic_pool_size);
 
 	atomic_pool = gen_pool_create(PAGE_SHIFT, -1);
Signature · 1 line
2.19.1

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

ping?

Quoted 29 lines · Christoph Hellwig

We already zero the memory after allocating it from the pool that this function fills, and having the memset here in this form means we can't support CMA highmem allocations.

---
 kernel/dma/remap.c | 1 -
 1 file changed, 1 deletion(-)
kernel/dma/remap.c +0 -1
index 68a64e3ff6a1..6e784824326f 100644
@@ -121,7 +121,6 @@ int __init dma_atomic_pool_init(gfp_t gfp, pgprot_t prot)
 	if (!page)
 		goto out;
 
-	memset(page_address(page), 0, atomic_pool_size);
 	arch_dma_prep_coherent(page, atomic_pool_size);
 
 	atomic_pool = gen_pool_create(PAGE_SHIFT, -1);
Signature · 6 lines
2.19.1

_______________________________________________
iommu mailing list
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

---end quoted text---