LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Souptick Joarder <jrdr.linux@gmail.com>,
	airlied@linux.ie, jonathanh@nvidia.com,
	dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu: drm: tegra: Adding new typedef vm_fault_t
Date: Mon, 23 Apr 2018 03:54:09 -0700	[thread overview]
Message-ID: <20180423105409.GC2308@bombadil.infradead.org> (raw)
In-Reply-To: <20180418082439.GA4646@ulmo>

On Wed, Apr 18, 2018 at 10:24:39AM +0200, Thierry Reding wrote:
> > @@ -437,20 +436,7 @@ static int tegra_bo_fault(struct vm_fault *vmf)
> >  	offset = (vmf->address - vma->vm_start) >> PAGE_SHIFT;
> >  	page = bo->pages[offset];
> > 
> > -	err = vm_insert_page(vma, vmf->address, page);
> > -	switch (err) {
> > -	case -EAGAIN:
> > -	case 0:
> > -	case -ERESTARTSYS:
> > -	case -EINTR:
> > -	case -EBUSY:
> > -		return VM_FAULT_NOPAGE;
> > -
> > -	case -ENOMEM:
> > -		return VM_FAULT_OOM;
> > -	}
> > -
> > -	return VM_FAULT_SIGBUS;
> > +	return vmf_insert_page(vma, vmf->address, page);
> >  }
> 
> This new function returns VM_FAULT_NOPAGE only for 0 and -EBUSY, whereas
> we used to return VM_FAULT_NOPAGE for -EAGAIN, -ERESTARTSYS and -EINTR
> as well. Was this previously wrong?

Not so much wrong as unnecessary.  vm_insert_page() can't return -EAGAIN,
-ERESTARTSYS or -EINTR.

  parent reply	other threads:[~2018-04-23 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 13:47 Souptick Joarder
2018-04-18  8:24 ` Thierry Reding
2018-04-18 11:09   ` Souptick Joarder
2018-04-23 10:54   ` Matthew Wilcox [this message]
2018-05-11 18:20     ` Souptick Joarder
2018-05-14 12:59 ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180423105409.GC2308@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --subject='Re: [PATCH] gpu: drm: tegra: Adding new typedef vm_fault_t' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).