From: Jerome Glisse Subject: Re: [PATCH v2 09/18] drm/via: set FOLL_PIN via pin_user_pages_fast() Date: Mon, 4 Nov 2019 12:44:45 -0500 Message-ID: <20191104174445.GF5134@redhat.com> References: <20191103211813.213227-1-jhubbard@nvidia.com> <20191103211813.213227-10-jhubbard@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20191103211813.213227-10-jhubbard@nvidia.com> Content-Disposition: inline Sender: netdev-owner@vger.kernel.org To: John Hubbard Cc: Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko List-Id: dri-devel@lists.freedesktop.org On Sun, Nov 03, 2019 at 01:18:04PM -0800, John Hubbard wrote: > Convert drm/via to use the new pin_user_pages_fast() call, which sets > FOLL_PIN. Setting FOLL_PIN is now required for code that requires > tracking of pinned pages, and therefore for any code that calls > put_user_page(). >=20 > Reviewed-by: Ira Weiny > Signed-off-by: John Hubbard Please be more explicit that via_dmablit.c is already using put_user_page() as i am expecting that any conversion to pin_user_pages*() must be pair wit= h a put_user_page(). I find above commit message bit unclear from that POV. Reviewed-by: J=E9r=F4me Glisse > --- > drivers/gpu/drm/via/via_dmablit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_= dmablit.c > index 3db000aacd26..37c5e572993a 100644 > --- a/drivers/gpu/drm/via/via_dmablit.c > +++ b/drivers/gpu/drm/via/via_dmablit.c > @@ -239,7 +239,7 @@ via_lock_all_dma_pages(drm_via_sg_info_t *vsg, drm_v= ia_dmablit_t *xfer) > =09vsg->pages =3D vzalloc(array_size(sizeof(struct page *), vsg->num_pag= es)); > =09if (NULL =3D=3D vsg->pages) > =09=09return -ENOMEM; > -=09ret =3D get_user_pages_fast((unsigned long)xfer->mem_addr, > +=09ret =3D pin_user_pages_fast((unsigned long)xfer->mem_addr, > =09=09=09vsg->num_pages, > =09=09=09vsg->direction =3D=3D DMA_FROM_DEVICE ? FOLL_WRITE : 0, > =09=09=09vsg->pages); > --=20 > 2.23.0 >=20