From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
To: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
Cc: "Konrad Rzeszutek Wilk"
<konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
"Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>,
"Linux Kernel Mailing List"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
dri-devel
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
"Chris Wilson"
<chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>,
"Christoph Hellwig" <hch-jcswGhMUV9g@public.gmane.org>
Subject: Re: [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test
Date: Wed, 2 May 2018 14:41:51 +0200 [thread overview]
Message-ID: <20180502124151.GA22857@lst.de> (raw)
In-Reply-To: <CAKMK7uH2+v3_UUqXdCjz_8=H4VRt1zB+dgE99PuuPqd+XM2=-w@mail.gmail.com>
On Wed, May 02, 2018 at 02:18:56PM +0200, Daniel Vetter wrote:
> Other dma-api backends like cma just shut up when __GFP_NOWARN is
> passed. And afaiui Christoph Hellwig has plans to nuke the DMA_ATTR
> stuff (or at least clean it up) - should we just remove
> DMA_ATTR_NO_WARN and instead only look at __GFP_NOWARN?
No. __GFP_NOWARN (and gfp_t flags in general) are the wrong interface
for dma allocations and just cause problems. I actually plan to
get rid of the gfp_t argument in dma_alloc_attrs sooner, and only
allow either GFP_KERNEL or GFP_DMA passed in dma_alloc_coherent.
> Or maybe we should at least enforce that both or none are set, for
> consistency for now?
The interface should be DMA_ATTR_NO_WARN. __GFP_NOWARN in this
context was never documented, and just slipped in.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "Christian König" <christian.koenig@amd.com>,
"Chris Wilson" <chris@chris-wilson.co.uk>,
"Michel Dänzer" <michel@daenzer.net>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"Christoph Hellwig" <hch@lst.de>,
iommu@lists.linux-foundation.org,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test
Date: Wed, 2 May 2018 14:41:51 +0200 [thread overview]
Message-ID: <20180502124151.GA22857@lst.de> (raw)
In-Reply-To: <CAKMK7uH2+v3_UUqXdCjz_8=H4VRt1zB+dgE99PuuPqd+XM2=-w@mail.gmail.com>
On Wed, May 02, 2018 at 02:18:56PM +0200, Daniel Vetter wrote:
> Other dma-api backends like cma just shut up when __GFP_NOWARN is
> passed. And afaiui Christoph Hellwig has plans to nuke the DMA_ATTR
> stuff (or at least clean it up) - should we just remove
> DMA_ATTR_NO_WARN and instead only look at __GFP_NOWARN?
No. __GFP_NOWARN (and gfp_t flags in general) are the wrong interface
for dma allocations and just cause problems. I actually plan to
get rid of the gfp_t argument in dma_alloc_attrs sooner, and only
allow either GFP_KERNEL or GFP_DMA passed in dma_alloc_coherent.
> Or maybe we should at least enforce that both or none are set, for
> consistency for now?
The interface should be DMA_ATTR_NO_WARN. __GFP_NOWARN in this
context was never documented, and just slipped in.
next prev parent reply other threads:[~2018-05-02 12:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 13:24 [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test Michel Dänzer
2018-05-01 13:24 ` Michel Dänzer
[not found] ` <20180501132411.2311-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-05-02 9:49 ` Christian König
2018-05-02 9:49 ` Christian König
2018-05-02 12:18 ` Daniel Vetter
2018-05-02 12:18 ` Daniel Vetter
2018-05-02 12:41 ` Christoph Hellwig [this message]
2018-05-02 12:41 ` Christoph Hellwig
2018-05-02 14:31 ` Michel Dänzer
2018-05-02 16:21 ` Christoph Hellwig
2018-05-02 16:59 ` Michel Dänzer
2018-05-02 16:59 ` Michel Dänzer
2018-05-22 13:13 ` Christian König
[not found] ` <1cbc4e10-96e6-c222-fb1a-fd7847be5755-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-05-25 8:41 ` Christoph Hellwig
2018-05-25 8:41 ` Christoph Hellwig
2018-05-25 8:41 ` Michel Dänzer
2018-05-25 8:41 ` Michel Dänzer
2018-05-02 12:42 ` Christoph Hellwig
2018-05-02 12:42 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2018-05-10 0:49 [PATCH] swiotlb: fix " Prasanthi Chellakumar
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=20180502124151.GA22857@lst.de \
--to=hch-jcswghmuv9g@public.gmane.org \
--cc=chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=daniel-/w4YWyX8dFk@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michel-otUistvHUpPR7s880joybQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.