summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_biomem.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-16 12:31:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-11-16 12:31:02 +0000
commit84110ac1ecd0b90236884f584c62f0aba5630fc2 (patch)
treefad09b733c1e1122314b073b82f6d36a1024e050 /sys/kern/vfs_biomem.c
parentcbbf1bf46622bbdb478ef4df4e4e027e0b83fc62 (diff)
Replace a plethora of historical protection options with just
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
Diffstat (limited to 'sys/kern/vfs_biomem.c')
-rw-r--r--sys/kern/vfs_biomem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_biomem.c b/sys/kern/vfs_biomem.c
index c2ccb1067c2..c822cfb7ca7 100644
--- a/sys/kern/vfs_biomem.c
+++ b/sys/kern/vfs_biomem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_biomem.c,v 1.30 2014/08/11 19:16:56 miod Exp $ */
+/* $OpenBSD: vfs_biomem.c,v 1.31 2014/11/16 12:31:00 deraadt Exp $ */
/*
* Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
@@ -53,8 +53,8 @@ buf_mem_init(vsize_t size)
buf_kva_start = vm_map_min(kernel_map);
if (uvm_map(kernel_map, &buf_kva_start, size, NULL,
- UVM_UNKNOWN_OFFSET, PAGE_SIZE, UVM_MAPFLAG(UVM_PROT_NONE,
- UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)))
+ UVM_UNKNOWN_OFFSET, PAGE_SIZE, UVM_MAPFLAG(PROT_NONE,
+ PROT_NONE, UVM_INH_NONE, POSIX_MADV_NORMAL, 0)))
panic("bufinit: can't reserve VM for buffers");
buf_kva_end = buf_kva_start + size;
@@ -138,7 +138,7 @@ buf_map(struct buf *bp)
KASSERT(pg != NULL);
pmap_kenter_pa(va + ptoa(i), VM_PAGE_TO_PHYS(pg),
- VM_PROT_READ|VM_PROT_WRITE);
+ PROT_READ | PROT_WRITE);
}
pmap_update(pmap_kernel());
bp->b_data = (caddr_t)va;