Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4092539imm; Mon, 18 Jun 2018 09:02:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLL35ZHzMRQQMQ3azx6+EcTlTfkYWiSqX2fY2run6G2+bWf6Acfc9vA+Xq69OALp6AhkkhO X-Received: by 2002:a63:7983:: with SMTP id u125-v6mr11485319pgc.267.1529337734247; Mon, 18 Jun 2018 09:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529337734; cv=none; d=google.com; s=arc-20160816; b=wSXqv+JXB1Y3qs0sGKnf3GQ5+H0gyda44Fmm+73o2cGN4M0zwLEw704Q6IfH3velWb R2QRl6WiDy3mL6g8hOIUpe2Lj0n9BcKY+EBXbcfjZvORoKztKNGlGFXdy4dMpWfctvVk uiwuUrzmd8ZQ19/JavhHzqfkgjFno59gpcVNhsxGOHx3Asm/0UvsOswqrRlt1+VKTVyh EVfPe/MWApqeX53mMiQcWHHswyFQME0ZjMNx3+iolbgGCrYsEaZz90UHijUKxaxKKuxY xtuhd+BW3tJZ+/lCGn2Byxh/JX1MK1J+GTicP+cRT0sB9KzkfMO3RXKMLPI1VQWiluFk PMMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=UC5UT7DCoM6UP9KeiiKK6268yi5oWSn9Xg9opObNozA=; b=NWJ3PJcMdjSXlo/4rixDQdCbt8HTh3bNks63RgG1bJUkSyO9qH+Lb7fRbt0qZOg8rr axKIciBshrKgyTjV+JYh+BI9JaegBMqqcwoHTQKzRDvwhX1vN5XMdyRUEdQ1uNz9+GMN gt8ghwIuTc6HEIdxppQbjErDP89q5IK2h0zXjoTCzGcW6vFOblxQDyQCTWw5SCiT5SXQ dVe/77Cb3lQOm9//ulJwomhu4oADOR+mOYafQXYoLjc2m87y8GxtakkjlYx3qGjWA4jt bALRdS4uwV5gE3ni3Wf+SE2+t+q/6vb0OwS87sRpZ4qzQ2Tkrn2zZlLzDLeMXbdLDmOB Dicw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=T0IdJ828; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9-v6si16216968plk.111.2018.06.18.09.01.59; Mon, 18 Jun 2018 09:02:14 -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=fail header.i=@ffwll.ch header.s=google header.b=T0IdJ828; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934536AbeFRQAN (ORCPT + 99 others); Mon, 18 Jun 2018 12:00:13 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:43250 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932442AbeFRQAM (ORCPT ); Mon, 18 Jun 2018 12:00:12 -0400 Received: by mail-io0-f194.google.com with SMTP id t6-v6so17257958iob.10 for ; Mon, 18 Jun 2018 09:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=UC5UT7DCoM6UP9KeiiKK6268yi5oWSn9Xg9opObNozA=; b=T0IdJ828PHm7JZwJ1QodpiSu88UfTQOEU3y+jroJkoCXcWZ3EEyMDJVbn5Ela7QRJw b1J2HEoKDuJOUre+F01bvkNDzahKdrIsAEt9DigS60a8bTfkEzYS7DdkSNqutrKK8rzO I4Qz73JsVXtmKBl2oH6Eaa543WH1cJw8XbG9Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=UC5UT7DCoM6UP9KeiiKK6268yi5oWSn9Xg9opObNozA=; b=qHymravnke3lQWESKrBuDozfcnOZxAYmUNw56klKe4I/Yn3VhX6PZdTPQvnObcvp87 ncsPPu90i2lMjLg8w5H7XEupLfgqUQJiJ4q+gXP3Is2eABSZxVe/IxM7hbNqzPxQC3Dy Q+MRYjTyiXOzIYRKvmQgUOLQ6vCnBDE9UmqTcW2OiSjN75KsJw7MOTX9tMJ+8yRc+4Ma brgLM+0AzYO8TUOrPSLW6fSbz93dNtuvfWSFfHDwC2cpotRN9k+2sNdfHu5pZenfLZCh iOVFoHuowni3rZctDoWNXU9cj6E6uDBJlGsZp3Gwlz0Y6FY29/3lqzfniLWLbaXMqkVQ nI2A== X-Gm-Message-State: APt69E2bZ4KwGOei5GajlL2jffkiD2sLG9dHuRFGAQ4wJoIH8hsEpMVF U0gP7YxKJ9ahSSIM0iBjYte069L3DptlkXRCUaofQw== X-Received: by 2002:a6b:c544:: with SMTP id v65-v6mr10422230iof.278.1529337612073; Mon, 18 Jun 2018 09:00:12 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:e48b:0:0:0:0:0 with HTTP; Mon, 18 Jun 2018 09:00:11 -0700 (PDT) X-Originating-IP: [2a02:168:5628:0:d0c7:bcda:eea:9e5d] In-Reply-To: References: <20180416150232.GA26745@jordon-HP-15-Notebook-PC> <20180510185138.GL33053@art_vandelay> <20180514162617.GD28661@phenom.ffwll.local> <20180524125756.GO3438@phenom.ffwll.local> From: Daniel Vetter Date: Mon, 18 Jun 2018 18:00:11 +0200 X-Google-Sender-Auth: 5rmr5DG7On7fPavoV9asu9EUoc0 Message-ID: Subject: Re: [PATCH] gpu: drm: vgem: Change return type to vm_fault_t To: Souptick Joarder Cc: Sean Paul , Linux Kernel Mailing List , Matthew Wilcox , dri-devel 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 Mon, Jun 18, 2018 at 1:26 PM, Souptick Joarder wrote: > 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 :-) I mixed up my book-keeping, it was queued for 4.19. Should show up in linux-next any day (well as soon as drm-misc maintainers get their book-keeping updated). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch