Re: [PATCH] gpu: drm: tegra: Adding new typedef vm_fault_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux