diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-15 02:24:24 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-15 02:24:24 +0000 |
commit | f61f2ae4bb51d8b7a9ee01c2989522f336618d7d (patch) | |
tree | 5a1de4696d0daa317cad34f8858407df1e10805f /sys/dev/pci/drm/i915 | |
parent | ec8373aeb4f1b524b9597fc90351bc52eb411ca2 (diff) |
Use MAP_INHERIT_* for the 'inh' argument to the UMV_MAPFLAG() macro,
eliminating the must-be-kept-in-sync UVM_INH_* macros
ok deraadt@ tedu@
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_ringbuffer.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c index 64d9f0f0ca7..29c2f318c9e 100644 --- a/sys/dev/pci/drm/i915/i915_gem.c +++ b/sys/dev/pci/drm/i915/i915_gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem.c,v 1.76 2014/11/16 12:31:00 deraadt Exp $ */ +/* $OpenBSD: i915_gem.c,v 1.77 2014/12/15 02:24:23 guenther Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -1451,7 +1451,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data, addr = 0; ret = -uvm_map(&curproc->p_vmspace->vm_map, &addr, size, obj->uao, args->offset, 0, UVM_MAPFLAG(PROT_READ | PROT_WRITE, - PROT_READ | PROT_WRITE, UVM_INH_SHARE, POSIX_MADV_RANDOM, 0)); + PROT_READ | PROT_WRITE, MAP_INHERIT_SHARE, POSIX_MADV_RANDOM, 0)); if (ret == 0) uao_reference(obj->uao); drm_gem_object_unreference_unlocked(obj); diff --git a/sys/dev/pci/drm/i915/intel_ringbuffer.c b/sys/dev/pci/drm/i915/intel_ringbuffer.c index 4ca0ea6f64b..614cf25fa6f 100644 --- a/sys/dev/pci/drm/i915/intel_ringbuffer.c +++ b/sys/dev/pci/drm/i915/intel_ringbuffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_ringbuffer.c,v 1.21 2014/11/16 12:31:00 deraadt Exp $ */ +/* $OpenBSD: intel_ringbuffer.c,v 1.22 2014/12/15 02:24:23 guenther Exp $ */ /* * Copyright © 2008-2010 Intel Corporation * @@ -476,7 +476,7 @@ init_pipe_control(struct intel_ring_buffer *ring) obj->base.uao->pgops->pgo_reference(obj->base.uao); ret = uvm_map(kernel_map, (vaddr_t *)&pc->cpu_page, PAGE_SIZE, obj->base.uao, 0, 0, UVM_MAPFLAG(PROT_READ | PROT_WRITE, - PROT_READ | PROT_WRITE, UVM_INH_SHARE, POSIX_MADV_RANDOM, 0)); + PROT_READ | PROT_WRITE, MAP_INHERIT_SHARE, POSIX_MADV_RANDOM, 0)); if (ret != 0) { DRM_ERROR("Failed to map status page.\n"); obj->base.uao->pgops->pgo_detach(obj->base.uao); @@ -1123,7 +1123,7 @@ static int init_status_page(struct intel_ring_buffer *ring) obj->base.uao->pgops->pgo_reference(obj->base.uao); ret = uvm_map(kernel_map, (vaddr_t *)&ring->status_page.page_addr, PAGE_SIZE, obj->base.uao, 0, 0, UVM_MAPFLAG(PROT_READ | PROT_WRITE, - PROT_READ | PROT_WRITE, UVM_INH_SHARE, POSIX_MADV_RANDOM, 0)); + PROT_READ | PROT_WRITE, MAP_INHERIT_SHARE, POSIX_MADV_RANDOM, 0)); if (ret != 0) { obj->base.uao->pgops->pgo_detach(obj->base.uao); ret = -ENOMEM; |