Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4255055ybx; Mon, 4 Nov 2019 10:14:04 -0800 (PST) X-Google-Smtp-Source: APXvYqxIW1XetMXaplOrZVI+Oh6BjD6IDJwieJMdfEpQl0vkcdkh6MwpotT9dMOSQSrTSHWlq4J8 X-Received: by 2002:a50:91f6:: with SMTP id h51mr30452471eda.99.1572891244119; Mon, 04 Nov 2019 10:14:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572891244; cv=none; d=google.com; s=arc-20160816; b=IB6LPVy1rcz6eI6g91MMVVbpftUnC2N7vBAwzyZ26nU+FiUQrfEkcNG0GRE9+zN8Qg rikwLNrM4C6x3i8gzzgzh2OFw0/820s6hpVqAkxN3Uf5+wit6b0iMgmqH6Fuu1H9Yu2K AMQHJhJRdm1ahkWGvdKTnOkWkm5CHUMCl8MzKk3JMVWUwQyrAH6borQXJG0O5g6QhxjH Ei6uKe8Cm9xY2fPd0Q2F53cMuKwxHIdMkDmoHmYp4ZudQfx9P76Dsp0QZIFOKYXTCzFe 8oTmsFGWeod2hl9vISmYk4uSadSMssHEP/gjWYmsQqceuvkIXz4F11Hj3F8IF/FT2jjH rD/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=j2dTn7Wj7MGJZeGgFXPtBogE4qg0BoOVrIkL6wJedbU=; b=k2fAw3uNtssOUjoZ0W++d02MnZ3K/AJUyrh07ejvBr2hA2izb2lGN4gVTq3BDBRm6l qS57eRtfEVujtu8Ry8xHvIb1PGOtSDRAdFLO8jd/QGeNzTd93i+Mzi6bjsR19dXHk+zJ Qovp9NCWJYwe9Lgqq3VwbwU64pY8tl6KlGe6PdZJDOvh63Zv3CerooSutlSScF6FuXl6 nejzLyDBGzbTzArnTwSWof97CJnQG/mQqOVVyJauDlExqzbxxaJwRdRi1va9KVU6lct0 kVsGdemsvWmo8IGfUh3agBRQALLykfyHiu82JypfR3S8Pj/3EN8TX1teHbyTeQdBdwdF uYOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=RPIdhIou; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i24si11649516ejh.35.2019.11.04.10.13.40; Mon, 04 Nov 2019 10:14:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=RPIdhIou; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728322AbfKDSLC (ORCPT + 99 others); Mon, 4 Nov 2019 13:11:02 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42455 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728336AbfKDSLB (ORCPT ); Mon, 4 Nov 2019 13:11:01 -0500 Received: by mail-wr1-f65.google.com with SMTP id a15so18204197wrf.9 for ; Mon, 04 Nov 2019 10:10:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=j2dTn7Wj7MGJZeGgFXPtBogE4qg0BoOVrIkL6wJedbU=; b=RPIdhIouR3j/Ac7neKFnGVsgwJtt56byt4O2813ik4ObcxN+6tPIIPEpIvd4bHdCQy xfCULaOlOfNgr9pPNLunatyY1TT5oMd7MopfAimYN7Fzif9xA431/mZ6rvrz1NeweKf9 nhCRlvw6Mqd6dfgcS8I0AQ1BearSl/gQZ3yck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=j2dTn7Wj7MGJZeGgFXPtBogE4qg0BoOVrIkL6wJedbU=; b=ukB/LHdRqPEFIfO28AfLJXq5A4sjLTipc/ziXhwI+6Cs3N6qPIQjFKwcOTjwXej8o9 LefjgNgGi1coIS1GsaSwB52lBgKhXBpnVw3tU/93701aLr8MSsLhd5W//pQXH6QBKXm5 +L190gBZSQ2d/3RTNAeOYclWLSPsbbyN8HTo9pPCd0znsWHPjTXJv82AQxROg6hbQgNW 1rvGHDwXsjdqwdgEB0mtPMWZaBlvm5sHoTgEa4zMyfcp8UjkJJUmuosHnYU+M7Roysk1 ZnDW531cZJM4zxZ8itYRUksmYCsTweRkwU+GSTHHjhpRdg8f6BhaiB1leERSYvdg5j1o tYNg== X-Gm-Message-State: APjAAAVoN8Gk09l6YsApqMg8PVWOJngMxF6lyN/coPg5OXa66d+j02wQ qx6EZnd2KeocSowqJMb8k5JIQg== X-Received: by 2002:a5d:448a:: with SMTP id j10mr25997024wrq.79.1572891058912; Mon, 04 Nov 2019 10:10:58 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id f13sm17508153wrq.96.2019.11.04.10.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 10:10:57 -0800 (PST) Date: Mon, 4 Nov 2019 19:10:55 +0100 From: Daniel Vetter To: Ira Weiny Cc: John Hubbard , 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" , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?iso-8859-1?B?Suly9G1l?= Glisse , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH 09/19] drm/via: set FOLL_PIN via pin_user_pages_fast() Message-ID: <20191104181055.GP10326@phenom.ffwll.local> Mail-Followup-To: Ira Weiny , John Hubbard , Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Dave Chinner , David Airlie , "David S . Miller" , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?iso-8859-1?B?Suly9G1l?= Glisse , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-mm@kvack.org, LKML References: <20191030224930.3990755-1-jhubbard@nvidia.com> <20191030224930.3990755-10-jhubbard@nvidia.com> <20191031233628.GI14771@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031233628.GI14771@iweiny-DESK2.sc.intel.com> X-Operating-System: Linux phenom 5.2.0-3-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 31, 2019 at 04:36:28PM -0700, Ira Weiny wrote: > On Wed, Oct 30, 2019 at 03:49:20PM -0700, 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(). > > > > Reviewed-by: Ira Weiny No one's touching the via driver anymore, so feel free to merge this through whatever tree suits best (aka I'll drop this on the floor and forget about it now). Acked-by: Daniel Vetter > > > Signed-off-by: John Hubbard > > --- > > drivers/gpu/drm/via/via_dmablit.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > 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_via_dmablit_t *xfer) > > vsg->pages = vzalloc(array_size(sizeof(struct page *), vsg->num_pages)); > > if (NULL == vsg->pages) > > return -ENOMEM; > > - ret = get_user_pages_fast((unsigned long)xfer->mem_addr, > > + ret = pin_user_pages_fast((unsigned long)xfer->mem_addr, > > vsg->num_pages, > > vsg->direction == DMA_FROM_DEVICE ? FOLL_WRITE : 0, > > vsg->pages); > > -- > > 2.23.0 > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch