[Intel-gfx] [PATCH 2/2] drm/i915: Disable page-faults around the fast pwrite/pread paths
Chris Wilson
chris at chris-wilson.co.uk
Sat Jul 9 19:40:36 CEST 2011
On Sat, 09 Jul 2011 07:41:57 -0700, Eric Anholt <eric at anholt.net> wrote:
> On Sat, 9 Jul 2011 09:38:51 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
>
> > - vaddr = kmap_atomic(page, KM_USER0);
> > + vaddr = kmap_atomic(page);
> > + /* We have to disable faulting here in case the user address
> > + * is really a GTT mapping and so we can not enter
> > + * i915_gem_fault() whilst already holding struct_mutex.
> > + */
> > + pagefault_disable();
> > ret = __copy_from_user_inatomic(vaddr + page_offset,
> > user_data,
> > page_length);
> > - kunmap_atomic(vaddr, KM_USER0);
> > + pagefault_enable();
> > + kunmap_atomic(vaddr);
>
> does this even compile? Looks like you dropped an arg.
That parameter was removed several months ago and although a pass was made
through the kernel to update all callsites, this one inexplicably remained.
commit t 3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73
Author: Peter Zijlstra <a.p.zijlstra at chello.nl>
Date: Tue Oct 26 14:21:51 2010 -0700
mm: stack based kmap_atomic()
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list