summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorAriane van der Steldt <ariane@cvs.openbsd.org>2011-05-24 15:27:37 +0000
committerAriane van der Steldt <ariane@cvs.openbsd.org>2011-05-24 15:27:37 +0000
commit7bba91997a49a1b90aaf8f3cc262edbe355c7a92 (patch)
tree7da632cfed9dd94efc9b0d8c66977bd71bfc81a2 /sys/dev/pci
parent7fabffa3a5b326844134b3d5ff1443bc8bc9c2c5 (diff)
Reimplement uvm/uvm_map.
vmmap is designed to perform address space randomized allocations, without letting fragmentation of the address space go through the roof. Some highlights: - kernel address space randomization - proper implementation of guardpages - roughly 10% system time reduction during kernel build Tested by alot of people on tech@ and developers. Theo's machines are still happy.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/i915_drv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index cb8d7069df4..bab8dcd0094 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -1413,10 +1413,9 @@ 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.
*/
- addr = uvm_map_hint(curproc, VM_PROT_READ | VM_PROT_WRITE);
- ret = uvm_map_p(&curproc->p_vmspace->vm_map, &addr, nsize, &obj->uobj,
+ ret = uvm_map(&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), curproc);
+ UVM_INH_SHARE, UVM_ADV_RANDOM, 0));
done:
if (ret == 0)