Linux IOMMU Development
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Cc: Luis Chamberlain <mcgrof-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: remove dma_zalloc_coherent
Date: Tue, 8 Jan 2019 14:56:59 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1901081456370.6130@hadrien> (raw)
In-Reply-To: <alpine.DEB.2.20.1901081453380.6130@hadrien>



On Tue, 8 Jan 2019, Julia Lawall wrote:

>
>
> On Tue, 8 Jan 2019, Christoph Hellwig wrote:
>
> > Hi Linus and world,
> >
> > We've always had a weird situation around dma_zalloc_coherent.  To
> > safely support mapping the allocations to userspace major architectures
> > like x86 and arm have always zeroed allocations from dma_alloc_coherent,
> > but a couple other architectures were missing that zeroing either always
> > or in corner cases.  Then later we grew anothe dma_zalloc_coherent
> > interface to explicitly request zeroing, but that just added __GFP_ZERO
> > to the allocation flags, which for some allocators that didn't end
> > up using the page allocator ended up being a no-op and still not
> > zeroing the allocations.
> >
> > So for this merge window I fixed up all remaining architectures to zero
> > the memory in dma_alloc_coherent, and made dma_zalloc_coherent a no-op
> > wrapper around dma_alloc_coherent, which fixes all of the above issues.
> >
> > dma_zalloc_coherent is now pointless and can go away, and Luis helped
> > me writing a cocchinelle script and patch series to kill it, which I
> > think we should apply now just after -rc1 to finally settle these
> > issue.
> >
> > The script that generated the first patch is included here:
> >
> > @ replace_dma_zalloc_coherent @
> > expression dev, size, data, handle, flags;
> > @@
> >
> > -dma_zalloc_coherent(dev, size, handle, flags)
> > +dma_alloc_coherent(dev, size, handle, flags)
>
> Great.  We should also update api/alloc/zalloc-simple.cocci.  The message
> could just say that the z version is no longer needed.

Oops, I see that you already took care of it.  Thanks!

julia

  reply	other threads:[~2019-01-08 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 13:06 remove dma_zalloc_coherent Christoph Hellwig
2019-01-08 13:06 ` [PATCH 1/3] cross-tree: phase out dma_zalloc_coherent() Christoph Hellwig
     [not found] ` <20190108130701.14161-1-hch-jcswGhMUV9g@public.gmane.org>
2019-01-08 13:07   ` [PATCH 2/3] cross-tree: phase out dma_zalloc_coherent() on headers Christoph Hellwig
2019-01-08 14:30     ` Julia Lawall
2019-01-08 13:07 ` [PATCH 3/3] dma-mapping: remove dma_zalloc_coherent() Christoph Hellwig
     [not found]   ` <20190108130701.14161-4-hch-jcswGhMUV9g@public.gmane.org>
2019-01-08 14:29     ` Julia Lawall
2019-01-08 13:55 ` remove dma_zalloc_coherent Julia Lawall
2019-01-08 13:56   ` Julia Lawall [this message]
2019-01-11 18:16 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1901081456370.6130@hadrien \
    --to=julia.lawall-l2ftfq7bk8m@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mcgrof-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox