From patchwork Wed Jan 25 22:35:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9538081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E069A601D7 for ; Wed, 25 Jan 2017 22:36:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D503127D9B for ; Wed, 25 Jan 2017 22:36:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C93EC27E33; Wed, 25 Jan 2017 22:36:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 700A627D9B for ; Wed, 25 Jan 2017 22:36:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AD5C8982A; Wed, 25 Jan 2017 22:36:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4C2C86E1FF; Wed, 25 Jan 2017 22:36:36 +0000 (UTC) Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0Ly6KL-1cT8bp2NAz-015Y54; Wed, 25 Jan 2017 23:36:04 +0100 From: Arnd Bergmann To: Andrew Morton Subject: [PATCH] fixup! mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf Date: Wed, 25 Jan 2017 23:35:05 +0100 Message-Id: <20170125223558.1451224-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:AOeXMBsNyyetCYx2BbVoxiJpjKqaejOifLTGq5JGX9zrrj7booW i6wlNaUWaZBMf8JNuHjdJwf5etwxbUes6wMwMRKvIHUTz6Mk71DOGKEi7j8iT4/+XPP8Qv8 E22mpXq6wfRtk/+nBXbaQntX2Wvy+nAVbdY2p8hKC+zbL5KxwPcgIA49u7rCYdSfYzN2wnA W5wiJ5w4lDTAKy9RkBenQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:10sGMR7ZI/o=:o505GeqnRJS5zZFQyKW8dI i3vksiHCJFn1pW/Sf9mYlf41P9/Yi9vKQX5EyP+VIX9S1R/pfj9Qv8ePNki5y+N1FNhyvfxmi Y4nJArOywqbsUqJGcBpYj8ps82Yztsq+yUqq9D1ChFlopDUcfBOxw8r3bh0xlrK+tHv+xJNdb I2cmi6vuIF94JgosBXqDnOb3WCZWzqUfmmrwJwWcUCKN3fSJhNO2EmyppunP9b2Gg2qOmRJ7t MimAG+gjB2mRzTTwryceAYjb/uoj0BlPoh0FH+OtgIleaRbQO1zCZmq5bnYV9FHPlU7baLk2u p3I1b8mNqmqPAZieRSzMup7FjXWSshkMNLiH4Dm5GOJjLWaGHEc7wI0ja/vQBgCNHuBWO2Fd/ IRQ1BREVSRWXXfk1oge4+FPxf+avdi3iAdhjr6oKn+EtA7Acr8JaZ9MkjO7SxLtb/mSJ61Ffz MvVx5ppBopzJOyaM1h3BDfp+QF+Z81oNBqadNYzpH5GzL/u+CAY5eDNtju/a417fpNhtBwDml 65M3Rsz+QApaxhx/bkgZr98YKnHDTs4JiYtfx6Tj5LG8GUjDQciTVuMi8RMCKMCWbTzEf/sNb HzRTWES7IYS3fGD/oOmM+dBk05/BFWr2lpYwa+3HU58oAA8N76OZc5+cjyyh8krnrzc/+d6KQ fV+Pmwth5svfE1/xPUCwjj7BBdAZ28/PPH5/JyE0YmAXAtrTxpoG6KbwjpXjcN+kgwFQ= Cc: Dave Jiang , Arnd Bergmann , linux-kernel@vger.kernel.org, etnaviv@lists.freedesktop.org, Russell King , dri-devel@lists.freedesktop.org, Sebastian Reichel , Peter Ujfalusi , linux-mm@kvack.org, Tomi Valkeinen , Laurent Pinchart , Ross Zwisler X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP I ran into a couple of build problems on ARM, these are the changes that should be folded into the original patch that changed all the ->fault() prototypes Fixes: mmtom ("mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf") Signed-off-by: Arnd Bergmann Acked-by: Dave Jiang Acked-By: Sebastian Reichel --- drivers/gpu/drm/armada/armada_gem.c | 9 +++++---- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 2 +- drivers/gpu/drm/omapdrm/omap_drv.h | 2 +- drivers/hsi/clients/cmt_speech.c | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_gem.c b/drivers/gpu/drm/armada/armada_gem.c index a293c8be232c..e1917adc30a4 100644 --- a/drivers/gpu/drm/armada/armada_gem.c +++ b/drivers/gpu/drm/armada/armada_gem.c @@ -14,14 +14,15 @@ #include #include "armada_ioctlP.h" -static int armada_gem_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) +static int armada_gem_vm_fault(struct vm_fault *vmf) { - struct armada_gem_object *obj = drm_to_armada_gem(vma->vm_private_data); + struct drm_gem_object *gobj = vmf->vma->vm_private_data; + struct armada_gem_object *obj = drm_to_armada_gem(gobj); unsigned long pfn = obj->phys_addr >> PAGE_SHIFT; int ret; - pfn += (vmf->address - vma->vm_start) >> PAGE_SHIFT; - ret = vm_insert_pfn(vma, vmf->address, pfn); + pfn += (vmf->address - vmf->vma->vm_start) >> PAGE_SHIFT; + ret = vm_insert_pfn(vmf->vma, vmf->address, pfn); switch (ret) { case 0: diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.h b/drivers/gpu/drm/etnaviv/etnaviv_drv.h index c255eda40526..e41f38667c1c 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.h @@ -73,7 +73,7 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data, struct drm_file *file); int etnaviv_gem_mmap(struct file *filp, struct vm_area_struct *vma); -int etnaviv_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); +int etnaviv_gem_fault(struct vm_fault *vmf); int etnaviv_gem_mmap_offset(struct drm_gem_object *obj, u64 *offset); struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj); void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj); diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index 7d9dd5400cef..7a8f4bf6effb 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h @@ -204,7 +204,7 @@ int omap_gem_dumb_create(struct drm_file *file, struct drm_device *dev, int omap_gem_mmap(struct file *filp, struct vm_area_struct *vma); int omap_gem_mmap_obj(struct drm_gem_object *obj, struct vm_area_struct *vma); -int omap_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); +int omap_gem_fault(struct vm_fault *vmf); int omap_gem_op_start(struct drm_gem_object *obj, enum omap_gem_op op); int omap_gem_op_finish(struct drm_gem_object *obj, enum omap_gem_op op); int omap_gem_op_sync(struct drm_gem_object *obj, enum omap_gem_op op); diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c index 3deef6cc7d7c..7175e6bedf21 100644 --- a/drivers/hsi/clients/cmt_speech.c +++ b/drivers/hsi/clients/cmt_speech.c @@ -1098,9 +1098,9 @@ static void cs_hsi_stop(struct cs_hsi_iface *hi) kfree(hi); } -static int cs_char_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) +static int cs_char_vma_fault(struct vm_fault *vmf) { - struct cs_char *csdata = vma->vm_private_data; + struct cs_char *csdata = vmf->vma->vm_private_data; struct page *page; page = virt_to_page(csdata->mmap_base);