[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 06/34] drm/i915: convert put_page() to put_user_page*()
On Sun, Aug 04, 2019 at 03:48:47PM -0700, john.hubbard@xxxxxxxxx wrote: > From: John Hubbard <jhubbard@xxxxxxxxxx> > > For pages that were retained via get_user_pages*(), release those pages > via the new put_user_page*() routines, instead of via put_page() or > release_pages(). > > This is part a tree-wide conversion, as described in commit fc1d8e7cca2d > ("mm: introduce put_user_page*(), placeholder versions"). > > This is a merge-able version of the fix, because it restricts > itself to put_user_page() and put_user_pages(), both of which > have not changed their APIs. Later, i915_gem_userptr_put_pages() > can be simplified to use put_user_pages_dirty_lock(). Thanks for that. with this version we won't have any conflict. Ack for going through mm tree. > > Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > Cc: David Airlie <airlied@xxxxxxxx> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx > Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx> > --- > drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c > b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c > index 2caa594322bc..76dda2923cf1 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c > @@ -527,7 +527,7 @@ __i915_gem_userptr_get_pages_worker(struct work_struct > *_work) > } > mutex_unlock(&obj->mm.lock); > > - release_pages(pvec, pinned); > + put_user_pages(pvec, pinned); > kvfree(pvec); > > i915_gem_object_put(obj); > @@ -640,7 +640,7 @@ static int i915_gem_userptr_get_pages(struct > drm_i915_gem_object *obj) > __i915_gem_userptr_set_active(obj, true); > > if (IS_ERR(pages)) > - release_pages(pvec, pinned); > + put_user_pages(pvec, pinned); > kvfree(pvec); > > return PTR_ERR_OR_ZERO(pages); > @@ -675,7 +675,7 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object > *obj, > set_page_dirty_lock(page); > > mark_page_accessed(page); > - put_page(page); > + put_user_page(page); > } > obj->mm.dirty = false; > > -- > 2.22.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |