From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66600CA9EB5 for ; Mon, 4 Nov 2019 18:11:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 30BF82080F for ; Mon, 4 Nov 2019 18:11:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="RPIdhIou" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30BF82080F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E049C6B0006; Mon, 4 Nov 2019 13:11:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D8D5E6B0008; Mon, 4 Nov 2019 13:11:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE9496B000A; Mon, 4 Nov 2019 13:11:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0175.hostedemail.com [216.40.44.175]) by kanga.kvack.org (Postfix) with ESMTP id A2EDE6B0006 for ; Mon, 4 Nov 2019 13:11:01 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 5E70F3489 for ; Mon, 4 Nov 2019 18:11:01 +0000 (UTC) X-FDA: 76119386322.18.toad45_8cdb0069e31b X-HE-Tag: toad45_8cdb0069e31b X-Filterd-Recvd-Size: 7350 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Mon, 4 Nov 2019 18:11:00 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id s1so18264339wro.0 for ; Mon, 04 Nov 2019 10:11:00 -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=oG0pqGQQVWxqwawEiQ+Fv8BoGLeFIBgDnJxNpS+nRseSDhYvKs7ETPNhMEkgdwtVnC xRM682bCMQEkRybRli7Q5tpIiZYV4cjNkboXCNkMxL03U4nPOeSobux2ZRDLIXsY4kcz B+9knzulFtEK2DA5gspGUvQEBQ5gzb3plognS/I1MGcgdS2sGFlN2t3onnF8RtVYFmfh NeYF7Iqa4sHly4uKwPLOwAxELSmcLAysgVYMRxXUt0cgQ1VhntOO+zICPULiTuj00wMM NIG3svd5Yu0OkWnUroFi4MnCBBIeTt1+355HsGPlzKMpgZIHqYNBxJsw8b0Gl5ZwSlGi rTWg== X-Gm-Message-State: APjAAAX5jRonU5OTLDNiHnqABEmHMJ6eO7QdmOJA5JDfIBFWVSrXb2qt /CYfU+OadGvOR8Et7spytbiNtA== X-Google-Smtp-Source: APXvYqwKkCPGo7mLK0jIbZGuRHh4x9upKlx8LPQBL5XTz+fwA202HVPHUNfjQCRnXVzy4o6JxOqyww== 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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