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 582CFCA9EB5 for ; Mon, 4 Nov 2019 18:16:01 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C39EB20578 for ; Mon, 4 Nov 2019 18:16:00 +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 C39EB20578 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 476LZh6DjJzF3vQ for ; Tue, 5 Nov 2019 05:15:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=ffwll.ch (client-ip=2a00:1450:4864:20::442; helo=mail-wr1-x442.google.com; envelope-from=daniel@ffwll.ch; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ffwll.ch header.i=@ffwll.ch header.b="RPIdhIou"; dkim-atps=neutral Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 476LT82NyKzF3t7 for ; Tue, 5 Nov 2019 05:11:03 +1100 (AEDT) Received: by mail-wr1-x442.google.com with SMTP id p4so18198459wrm.8 for ; Mon, 04 Nov 2019 10:11:03 -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=gQZ8iMgUcAVuy33yliYhCRsgKoPslMq6Qkp+Pp7+eawZYtMbpdUAxor6Zb0ynOBm4e dO5iOsNBJFp7IfJ8GUG1SsSHO2Ti5c1kcW3NkW6F/d7eSv2bozkfo5A5zdQAKoNrmbrW v7YoUtfOW7VYKL3iK+wriGRfecPxcCk3MgOdP3h0huD2Fv2abATGl/MqOOuTsOLmjt1Y E5EeUAMIdQrPODj16WQU3dZcnVhW+2HU9TB7y7T0ige60tzEe5VnkV6cQa8nZGyYOT9/ buBRfM/siqCiGq45eGyjaBk0JjcK8SHkW6gHkwQ6MjMKO8XIEt2pdysOM7AswU7h3xa2 Beag== X-Gm-Message-State: APjAAAXxLDnvlwaeuFrKgo6C2oqB4/fo3NA55hnDVwCNslUt6bF7sCQE w78rMq972VqLfGbsEieQdoBS1g== 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 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Hocko , Jan Kara , kvm@vger.kernel.org, linux-doc@vger.kernel.org, David Airlie , Dave Chinner , dri-devel@lists.freedesktop.org, LKML , linux-mm@kvack.org, Paul Mackerras , linux-kselftest@vger.kernel.org, Shuah Khan , Jonathan Corbet , linux-rdma@vger.kernel.org, Christoph Hellwig , Jason Gunthorpe , Vlastimil Babka , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , linux-media@vger.kernel.org, John Hubbard , linux-block@vger.kernel.org, =?iso-8859-1?B?Suly9G1l?= Glisse , Al Viro , Dan Williams , Mauro Carvalho Chehab , bpf@vger.kernel.org, Magnus Karlsson , Jens Axboe , netdev@vger.kernel.org, Alex Williamson , Daniel Vetter , linux-fsdevel@vger.kernel.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S . Miller" , Mike Kravetz Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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