iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma-mapping: remove a pointless memset in dma_atomic_pool_init
@ 2018-12-04 16:06 Christoph Hellwig
       [not found] ` <20181204160619.3253-1-hch-jcswGhMUV9g@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2018-12-04 16:06 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: linux-I+IVW8TIWO2tmTQ+vhA3Yw

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.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Reported-by: Russell King - ARM Linux <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
---
 kernel/dma/remap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/dma/remap.c b/kernel/dma/remap.c
index 68a64e3ff6a1..6e784824326f 100644
--- a/kernel/dma/remap.c
+++ b/kernel/dma/remap.c
@@ -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);
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dma-mapping: remove a pointless memset in dma_atomic_pool_init
       [not found] ` <20181204160619.3253-1-hch-jcswGhMUV9g@public.gmane.org>
@ 2018-12-10 19:28   ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2018-12-10 19:28 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: linux-I+IVW8TIWO2tmTQ+vhA3Yw

ping?

On Tue, Dec 04, 2018 at 08:06:19AM -0800, Christoph Hellwig wrote:
> 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.
> 
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
> Reported-by: Russell King - ARM Linux <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
> ---
>  kernel/dma/remap.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/kernel/dma/remap.c b/kernel/dma/remap.c
> index 68a64e3ff6a1..6e784824326f 100644
> --- a/kernel/dma/remap.c
> +++ b/kernel/dma/remap.c
> @@ -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);
> -- 
> 2.19.1
> 
> _______________________________________________
> iommu mailing list
> iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
---end quoted text---

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-10 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 16:06 [PATCH] dma-mapping: remove a pointless memset in dma_atomic_pool_init Christoph Hellwig
     [not found] ` <20181204160619.3253-1-hch-jcswGhMUV9g@public.gmane.org>
2018-12-10 19:28   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).