[Intel-gfx] [PATCH 2/2] drm/i915: Use remap_io_mapping() to prefault all PTE in a single pass
Chris Wilson
chris at chris-wilson.co.uk
Fri Aug 19 12:23:55 UTC 2016
On Fri, Aug 19, 2016 at 02:32:05PM +0300, Joonas Lahtinen wrote:
> On ma, 2016-08-15 at 12:53 +0100, Chris Wilson wrote:
> > +int remap_io_mapping(struct vm_area_struct *vma,
> > + unsigned long addr, unsigned long pfn, unsigned long size,
> > + struct io_mapping *iomap)
> > +{
> > + struct remap_pfn r;
> > + int err;
> > +
> > +#define MUST_SET (VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP)
> > + if (WARN_ON((vma->vm_flags & MUST_SET) != MUST_SET))
> > + return -EINVAL;
> > +#undef MUST_SET
>
> #define is bit overkill...
Yeah, it was mostly to fit it onto one line. Since this is private we
can just go with GEM_BUG_ON()
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list