From patchwork Wed Nov 16 10:26:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13044690 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3CA5C4332F for ; Wed, 16 Nov 2022 10:29:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 419658E0008; Wed, 16 Nov 2022 05:29:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C93A8E0001; Wed, 16 Nov 2022 05:29:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 291048E0008; Wed, 16 Nov 2022 05:29:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 1AC658E0001 for ; Wed, 16 Nov 2022 05:29:39 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id EC5A31C697A for ; Wed, 16 Nov 2022 10:29:38 +0000 (UTC) X-FDA: 80138934036.20.D09448B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 9C899180003 for ; Wed, 16 Nov 2022 10:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668594578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rGA6GaR1az8P6UEdLsolXmCEn/P8qFigXL+8tO23Tsc=; b=EJHHdFmKn0s21LvsKtFCIUgcD7Rl9F4uQfi0qOoDrm+aXCjmBdxO11ovrhGwNJfh+Zv9U/ ghbTglOEtsR8VJzae6LtBDtcj9CWPlCRtcWq8anQ7MLpkHDa4oDyYKlpAKRnA5S0FfRUyw i0kDQick9LglVnA9rcX6Zrqcp7AR2uU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-166-zpGAvGWpOfO4G6I5WZe6qQ-1; Wed, 16 Nov 2022 05:29:34 -0500 X-MC-Unique: zpGAvGWpOfO4G6I5WZe6qQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2B0731C0A10A; Wed, 16 Nov 2022 10:29:33 +0000 (UTC) Received: from t480s.fritz.box (unknown [10.39.193.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82BA82028E8F; Wed, 16 Nov 2022 10:29:25 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-perf-users@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kselftest@vger.kernel.org, Linus Torvalds , Andrew Morton , Jason Gunthorpe , John Hubbard , Peter Xu , Greg Kroah-Hartman , Andrea Arcangeli , Hugh Dickins , Nadav Amit , Vlastimil Babka , Matthew Wilcox , Mike Kravetz , Muchun Song , Shuah Khan , Lucas Stach , David Airlie , Oded Gabbay , Arnd Bergmann , Christoph Hellwig , Alex Williamson , David Hildenbrand , Inki Dae , Seung-Woo Kim , Kyungmin Park , Daniel Vetter , Krzysztof Kozlowski Subject: [PATCH mm-unstable v1 17/20] drm/exynos: remove FOLL_FORCE usage Date: Wed, 16 Nov 2022 11:26:56 +0100 Message-Id: <20221116102659.70287-18-david@redhat.com> In-Reply-To: <20221116102659.70287-1-david@redhat.com> References: <20221116102659.70287-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668594578; a=rsa-sha256; cv=none; b=1weAUxIOUp9zu3q3+1mMufpUyVGVbO7J7nJvBNI1fOU8KycowaQ/HEh/Ms5+4WcOPBWp55 rYIPaAHQoXJTvREOraGw+H12DqyuDPGNDVzT7UGcmGJiYpbLFTAWea3RVivExp2D0fqYN8 e4AidXxfsozgUJ3Qi/JfIX807UQq8DE= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EJHHdFmK; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668594578; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rGA6GaR1az8P6UEdLsolXmCEn/P8qFigXL+8tO23Tsc=; b=QoNEuimOj1xQleRIv43AAh2qEFj5IlbNL+gMl/jitL7ciTCo2Y32Xc1gUtm0PtETjrwq4W AfsvHR/EzCCjVBiZLNOONpIswOd8RQ9n7u/3qj6SiLfio6wgaWSg+IibbC5WK5gqGYzAmi GX+b5R9wBuIffnaUAMNuUU811Usnrw8= X-Rspamd-Queue-Id: 9C899180003 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=EJHHdFmK; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 8q6x4drfo4jjzdt1ggof3q164gw9f8pu X-HE-Tag: 1668594578-959975 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: FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be a legacy leftover. Let's just remove it. Cc: Inki Dae Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Krzysztof Kozlowski Signed-off-by: David Hildenbrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 471fd6c8135f..e19c2ceb3759 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -477,7 +477,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d, } ret = pin_user_pages_fast(start, npages, - FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM, + FOLL_WRITE | FOLL_LONGTERM, g2d_userptr->pages); if (ret != npages) { DRM_DEV_ERROR(g2d->dev,