linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@gmail.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	 DRI Development <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Daniel Vetter <daniel.vetter@intel.com>,
	Inki Dae <inki.dae@samsung.com>,
	 Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	 Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	 Krzysztof Kozlowski <krzk@kernel.org>,
	Pawel Osciak <pawel@osciak.com>,
	 Marek Szyprowski <m.szyprowski@samsung.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Omer Shpigelman <oshpigelman@habana.ai>,
	Tomer Tayar <ttayar@habana.ai>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Pawel Piskorski <ppiskorski@habana.ai>,
	 "list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>,
	Joerg Roedel <joro@8bytes.org>,"
	<linux-arm-kernel@lists.infradead.org>,
	 linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	 Linux Media Mailing List <linux-media@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH 1/2] mm/frame-vec: Drop gup_flags from get_vaddr_frames()
Date: Fri, 2 Oct 2020 22:21:47 +0300	[thread overview]
Message-ID: <CAFCwf12zK9oLoShj9C71Bysg4Sd0VCaOHqPRJznZa_+SpB4j-Q@mail.gmail.com> (raw)
In-Reply-To: <CAAFQd5AsFOau=m_3UPh2tKqwiUJaY4NH9HHrHJ17gbCLDgTNCQ@mail.gmail.com>

On Fri, Oct 2, 2020 at 9:23 PM Tomasz Figa <tfiga@chromium.org> wrote:
>
> On Fri, Oct 2, 2020 at 7:53 PM Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> >
> > FOLL_WRITE | FOLL_FORCE is really the only reasonable thing to do for
> > simple dma device that can't guarantee write protection. Which is also
> > what all the callers are using.
> >
> > So just simplify this.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Inki Dae <inki.dae@samsung.com>
> > Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> > Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Kukjin Kim <kgene@kernel.org>
> > Cc: Krzysztof Kozlowski <krzk@kernel.org>
> > Cc: Pawel Osciak <pawel@osciak.com>
> > Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> > Cc: Tomasz Figa <tfiga@chromium.org>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Oded Gabbay <oded.gabbay@gmail.com>
> > Cc: Omer Shpigelman <oshpigelman@habana.ai>
> > Cc: Tomer Tayar <ttayar@habana.ai>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Pawel Piskorski <ppiskorski@habana.ai>
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linux-samsung-soc@vger.kernel.org
> > Cc: linux-media@vger.kernel.org
> > Cc: linux-mm@kvack.org
> > ---
> >  drivers/gpu/drm/exynos/exynos_drm_g2d.c           | 3 +--
> >  drivers/media/common/videobuf2/videobuf2-memops.c | 3 +--
> >  drivers/misc/habanalabs/common/memory.c           | 3 +--
> >  include/linux/mm.h                                | 2 +-
> >  mm/frame_vector.c                                 | 4 ++--
> >  5 files changed, 6 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> > index 967a5cdc120e..ac452842bab3 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
> > @@ -480,8 +480,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d,
> >                 goto err_free;
> >         }
> >
> > -       ret = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE,
> > -               g2d_userptr->vec);
> > +       ret = get_vaddr_frames(start, npages, g2d_userptr->vec);
> >         if (ret != npages) {
> >                 DRM_DEV_ERROR(g2d->dev,
> >                               "failed to get user pages from userptr.\n");
> > diff --git a/drivers/media/common/videobuf2/videobuf2-memops.c b/drivers/media/common/videobuf2/videobuf2-memops.c
> > index 6e9e05153f4e..9dd6c27162f4 100644
> > --- a/drivers/media/common/videobuf2/videobuf2-memops.c
> > +++ b/drivers/media/common/videobuf2/videobuf2-memops.c
> > @@ -40,7 +40,6 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
> >         unsigned long first, last;
> >         unsigned long nr;
> >         struct frame_vector *vec;
> > -       unsigned int flags = FOLL_FORCE | FOLL_WRITE;
> >
> >         first = start >> PAGE_SHIFT;
> >         last = (start + length - 1) >> PAGE_SHIFT;
> > @@ -48,7 +47,7 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
> >         vec = frame_vector_create(nr);
> >         if (!vec)
> >                 return ERR_PTR(-ENOMEM);
> > -       ret = get_vaddr_frames(start & PAGE_MASK, nr, flags, vec);
> > +       ret = get_vaddr_frames(start & PAGE_MASK, nr, vec);
> >         if (ret < 0)
> >                 goto out_destroy;
> >         /* We accept only complete set of PFNs */
>
> For drivers/media/common/videobuf2/:
>
> Acked-by: Tomasz Figa <tfiga@chromium.org>
>
> Best regards,
> Tomasz

For drivers/misc/habanalabs:
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>

Thanks,
Oded


      reply	other threads:[~2020-10-02 19:22 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 17:53 [PATCH 1/2] mm/frame-vec: Drop gup_flags from get_vaddr_frames() Daniel Vetter
2020-10-02 17:53 ` [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM Daniel Vetter
2020-10-02 18:06   ` Jason Gunthorpe
2020-10-02 18:16     ` Daniel Vetter
2020-10-02 23:31       ` Jason Gunthorpe
2020-10-03  8:34         ` Oded Gabbay
2020-10-03  9:40         ` Daniel Vetter
2020-10-04 12:50           ` Jason Gunthorpe
2020-10-04 16:09             ` Daniel Vetter
2020-10-05 17:28               ` Jason Gunthorpe
2020-10-05 18:16                 ` Daniel Vetter
2020-10-05 18:37                   ` Jason Gunthorpe
2020-10-05 18:54                     ` Daniel Vetter
2020-10-05 22:43                       ` Daniel Vetter
2020-10-05 23:41                         ` Jason Gunthorpe
2020-10-06  6:23                           ` Daniel Vetter
2020-10-06 12:26                             ` Jason Gunthorpe
2020-10-06 13:08                               ` Daniel Vetter
2020-10-07 10:47           ` Marek Szyprowski
2020-10-07 12:01             ` Daniel Vetter
2020-10-07 12:33               ` Marek Szyprowski
2020-10-07 12:44                 ` Jason Gunthorpe
2020-10-07 12:47                   ` Tomasz Figa
2020-10-07 12:58                     ` Daniel Vetter
2020-10-07 13:06                       ` Jason Gunthorpe
2020-10-07 13:34                         ` Tomasz Figa
2020-10-07 13:42                           ` Jason Gunthorpe
2020-10-07 14:08                           ` Daniel Vetter
2020-10-07 14:11                             ` Tomasz Figa
2020-10-07 14:22                               ` Daniel Vetter
2020-10-07 15:05                                 ` Tomasz Figa
2020-10-07 14:58                               ` Jason Gunthorpe
2020-10-07 13:06         ` Tomasz Figa
2020-10-07 13:14           ` Jason Gunthorpe
2020-10-05 15:03     ` Jan Kara
2020-10-02 22:39   ` John Hubbard
2020-10-03  9:45     ` Daniel Vetter
2020-10-03 22:52       ` John Hubbard
2020-10-03 23:24         ` Jason Gunthorpe
2020-10-04 11:20           ` Daniel Vetter
2020-10-05 17:35             ` Jason Gunthorpe
2020-10-02 18:22 ` [PATCH 1/2] mm/frame-vec: Drop gup_flags from get_vaddr_frames() Tomasz Figa
2020-10-02 19:21   ` Oded Gabbay [this message]

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=CAFCwf12zK9oLoShj9C71Bysg4Sd0VCaOHqPRJznZa_+SpB4j-Q@mail.gmail.com \
    --to=oded.gabbay@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=oshpigelman@habana.ai \
    --cc=pawel@osciak.com \
    --cc=ppiskorski@habana.ai \
    --cc=sw0312.kim@samsung.com \
    --cc=tfiga@chromium.org \
    --cc=ttayar@habana.ai \
    /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;
as well as URLs for NNTP newsgroup(s).