Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3803412imm; Mon, 18 Jun 2018 04:27:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJPYXW2cDRjTGFAPZH350MJmBQO94cT6Q1PgFQP0YUGcg8IuuoSK4XlgyHUpMizRXBcANTb X-Received: by 2002:a17:902:3f81:: with SMTP id a1-v6mr13696376pld.29.1529321263141; Mon, 18 Jun 2018 04:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529321263; cv=none; d=google.com; s=arc-20160816; b=mTiYpIoDbP/pAoFL+71De8zv2V4ZPq/1UwHTpFVDcLN1eqB25j0/of0r/npZevSzsB m+eSH1FI6nDFZb09OC0miFoaGR3glDlHjtT3qMU52JKgipUQn/IXjLQl8v4/ei+ToZte ljNofEwgV6eevFkBiSVQQm2w36dBy90MgJ+XymF9DtU4KDsUx+/EdgaGkHpoaY7PFFQx OIkMW/MftPKwx5ti6EhRdFGHuTL8M878XIAX8nWsIGPe/ewLRKz2QwQi8Jszsnm2EAeP 7G+UJ0Xt7Ikxots/yeHqQwA3LPLSVprqDjEZS7wdqca+6rueYFEQ1N7kNpN0CEsP+inC FdJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=N1Mz/eRDIlnNveXhuYQeIiSEn0mcMiP1W8hbUPnrC5Q=; b=1CqCnJn5M4C74HrvRFwKkDirBrg79C5TS5iZbft/BWUyg0oXpAc0IrXdmtOt2PEWX8 mFySVnNzarZr0ZVwrdC74ueEnGPQ7kU9ftvG2oSzLBY+XbJMGUg/cOdnnDTjIP2N8lUT +bEjfGrGtMjsv4mzG9Hk0o7JX5kYwCI+fQ4XPJpwSr+lwd3WDEX6FTOT4rSczvf8BQ5/ KngYr29SREOlUS6v6L6iRmqqQOxDRQ4Sc0FLD9ZFEG4hi4fB1xQ1EtMxnuoYkslNKOUT i0qBNkH/L1snXuC1uxTO/iDbhEoG5zYOOKgQKE/YgZeR0lygFANe9yLJXZ99IDzkiedN O/JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QVz1HnD3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11-v6si14321969plc.466.2018.06.18.04.27.29; Mon, 18 Jun 2018 04:27:43 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b=QVz1HnD3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933809AbeFRL0l (ORCPT + 99 others); Mon, 18 Jun 2018 07:26:41 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:43371 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932585AbeFRL0h (ORCPT ); Mon, 18 Jun 2018 07:26:37 -0400 Received: by mail-lf0-f67.google.com with SMTP id x13-v6so8621556lff.10 for ; Mon, 18 Jun 2018 04:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=N1Mz/eRDIlnNveXhuYQeIiSEn0mcMiP1W8hbUPnrC5Q=; b=QVz1HnD3oZ1NMoomkHgf1ZYyCb4ysJdHlQPwVH6C7SjQG4JtK6og0pLjVh3+YX4+qm HqdZMchYlEWJHJZeHzvcxsBHUgK+cXbqjcnyFhAOMqwvPC/DLo4wqvmazb9eKHoA/iHY jOaqncH/MO37xWPj4F6uDLmbim1xIgipzKVJirDwt7sMVGxTOcd5n2/pdGcHPd/6J1hV WK28kJ/sritI8a6jd6fxlUW1YM6G6IrFHkiDUMeatPnnuprqty8YvOefcLHn0kfpPpdN VkKf6Keb2bigPN/E94SqGR05YLul6yCMhrAsomNPERVYPD4evv2FniaEFZpUX0qpO5Al QG1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=N1Mz/eRDIlnNveXhuYQeIiSEn0mcMiP1W8hbUPnrC5Q=; b=MqhEW0gDiYwmkQOmTgjlK96GPxiuBLCcSGmYsBCI7XESPZJDKBNow4k0gCAwgVQxll W3Plhek5smaG0Egf2ugx3llRRwcc3lhioEUytYV0yQO7mE70muhpJbdufsBC+W3yY9WT 92OqrfQhSMWAX9X3KBPOXd3ysqQOAYqsVYShWukbV7GD9ZxenRFtXN0xpVCpNOtrPypx 6WxRzDvjv2GPys6geDYiQL4vwHD7MA97wG3ZAAh495/rZofyWSpO3ddSG63JhZ5Vz3oL o/F+CcXAjS/YVo35wxkpprVSftYEPyP1Y1qWA5ss0TYcjfAig8Hk3HIgytGwnpSeawUi axEg== X-Gm-Message-State: APt69E222La13+1BWOLE3Fj5n7cf+iXCOdnOKUUWjHugErg8MT3pLB/N /oOLIkVVrg+wTpYsp3Y5htKRglhNnudOEwh3R3Y= X-Received: by 2002:a19:1647:: with SMTP id m68-v6mr7554278lfi.131.1529321196250; Mon, 18 Jun 2018 04:26:36 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:2b43:0:0:0:0:0 with HTTP; Mon, 18 Jun 2018 04:26:35 -0700 (PDT) In-Reply-To: <20180524125756.GO3438@phenom.ffwll.local> References: <20180416150232.GA26745@jordon-HP-15-Notebook-PC> <20180510185138.GL33053@art_vandelay> <20180514162617.GD28661@phenom.ffwll.local> <20180524125756.GO3438@phenom.ffwll.local> From: Souptick Joarder Date: Mon, 18 Jun 2018 16:56:35 +0530 Message-ID: Subject: Re: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t To: Souptick Joarder , Sean Paul , linux-kernel@vger.kernel.org, Matthew Wilcox , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 24, 2018 at 6:27 PM, Daniel Vetter wrote: > On Wed, May 23, 2018 at 03:05:35PM +0530, Souptick Joarder wrote: >> On Mon, May 14, 2018 at 9:56 PM, Daniel Vetter wrote: >> > On Thu, May 10, 2018 at 02:51:38PM -0400, Sean Paul wrote: >> >> On Thu, May 10, 2018 at 07:58:11PM +0530, Souptick Joarder wrote: >> >> > Hi Sean, >> >> > >> >> > On Mon, Apr 16, 2018 at 8:32 PM, Souptick Joarder wrote: >> >> > > Use new return type vm_fault_t for fault handler. >> >> > > >> >> > > Signed-off-by: Souptick Joarder >> >> > > Reviewed-by: Matthew Wilcox >> >> > > --- >> >> > > drivers/gpu/drm/vgem/vgem_drv.c | 5 ++--- >> >> > > 1 file changed, 2 insertions(+), 3 deletions(-) >> >> > > >> >> > > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c >> >> > > index 2524ff1..c64a859 100644 >> >> > > --- a/drivers/gpu/drm/vgem/vgem_drv.c >> >> > > +++ b/drivers/gpu/drm/vgem/vgem_drv.c >> >> > > @@ -61,13 +61,13 @@ static void vgem_gem_free_object(struct drm_gem_object *obj) >> >> > > kfree(vgem_obj); >> >> > > } >> >> > > >> >> > > -static int vgem_gem_fault(struct vm_fault *vmf) >> >> > > +static vm_fault_t vgem_gem_fault(struct vm_fault *vmf) >> >> > > { >> >> > > struct vm_area_struct *vma = vmf->vma; >> >> > > struct drm_vgem_gem_object *obj = vma->vm_private_data; >> >> > > /* We don't use vmf->pgoff since that has the fake offset */ >> >> > > unsigned long vaddr = vmf->address; >> >> > > - int ret; >> >> > > + vm_fault_t ret = VM_FAULT_SIGBUS; >> >> > > loff_t num_pages; >> >> > > pgoff_t page_offset; >> >> > > page_offset = (vaddr - vma->vm_start) >> PAGE_SHIFT; >> >> > > @@ -77,7 +77,6 @@ static int vgem_gem_fault(struct vm_fault *vmf) >> >> > > if (page_offset > num_pages) >> >> > > return VM_FAULT_SIGBUS; >> >> > > >> >> > > - ret = -ENOENT; >> >> > > mutex_lock(&obj->pages_lock); >> >> > > if (obj->pages) { >> >> > > get_page(obj->pages[page_offset]); >> >> > > -- >> >> > > 1.9.1 >> >> > > >> >> > >> >> > Any further comment on this patch ? >> >> >> >> Patch looks good to me. My build test fails, though, since vm_fault_t doesn't >> >> exist in drm-misc-next yet. >> > >> > vm_fault_t is already in upstream, just needs Maarten to do a backmerge. >> > Which I think he's done by now ... Otherwise nag him more :-) >> > -Daniel >> > >> >> >> >> So, for now, >> >> >> >> Reviewed-by: Sean Paul >> >> >> >> >> >> -- >> >> Sean Paul, Software Engineer, Google / Chromium OS >> >> _______________________________________________ >> >> dri-devel mailing list >> >> dri-devel@lists.freedesktop.org >> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel >> > >> > -- >> > Daniel Vetter >> > Software Engineer, Intel Corporation >> > http://blog.ffwll.ch >> >> Daniel/ Sean, is this patch already merged for 4.18 ? > > Nope, fell through the cracks. Thanks for the reminder, queued for 4.18 > now. > -Daniel > Daniel, This patch is not available in 4.18-rc-1 :-)