diff options
author | Ariane van der Steldt <ariane@cvs.openbsd.org> | 2011-06-06 17:10:24 +0000 |
---|---|---|
committer | Ariane van der Steldt <ariane@cvs.openbsd.org> | 2011-06-06 17:10:24 +0000 |
commit | 100bcabc80107e37b8efd45890258b7852cfc054 (patch) | |
tree | e8b5e2a61d1db84e157951ce84c29f939b88c036 /sys/dev/pci/drm/i915_drv.c | |
parent | d2a285457d0c89bdbfc900ff091099f892e0e4f4 (diff) |
Backout vmmap in order to repair virtual address selection algorithms
outside the tree.
Diffstat (limited to 'sys/dev/pci/drm/i915_drv.c')
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index f42d09b1047..6b579639ac1 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.110 2011/06/02 18:22:00 weerd Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.111 2011/06/06 17:10:23 ariane Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -1422,9 +1422,10 @@ i915_gem_gtt_map_ioctl(struct drm_device *dev, void *data, * We give our reference from object_lookup to the mmap, so only * must free it in the case that the map fails. */ - ret = uvm_map(&curproc->p_vmspace->vm_map, &addr, nsize, &obj->uobj, + addr = uvm_map_hint(curproc, VM_PROT_READ | VM_PROT_WRITE); + ret = uvm_map_p(&curproc->p_vmspace->vm_map, &addr, nsize, &obj->uobj, offset, 0, UVM_MAPFLAG(UVM_PROT_RW, UVM_PROT_RW, - UVM_INH_SHARE, UVM_ADV_RANDOM, 0)); + UVM_INH_SHARE, UVM_ADV_RANDOM, 0), curproc); done: if (ret == 0) |