summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_hibernate.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-11-16 12:30:52 +0000
committerderaadt <deraadt@openbsd.org>2014-11-16 12:30:52 +0000
commit1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8 (patch)
tree739083100a383196b1776cb84f65da8812dc079b /sys/kern/subr_hibernate.c
parentRead your compiler output even when it succeeds. Add missing variable to (diff)
downloadwireguard-openbsd-1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8.tar.xz
wireguard-openbsd-1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8.zip
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/subr_hibernate.c')
-rw-r--r--sys/kern/subr_hibernate.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c
index d140bc0b76c..16303cd2e55 100644
--- a/sys/kern/subr_hibernate.c
+++ b/sys/kern/subr_hibernate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_hibernate.c,v 1.108 2014/11/05 05:48:45 mlarkin Exp $ */
+/* $OpenBSD: subr_hibernate.c,v 1.109 2014/11/16 12:31:00 deraadt Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -1392,7 +1392,7 @@ hibernate_write_chunks(union hibernate_info *hib)
if (rle == 0) {
pmap_kenter_pa(hibernate_temp_page,
inaddr & PMAP_PA_MASK,
- VM_PROT_READ);
+ PROT_READ);
pmap_activate(curproc);
@@ -1570,7 +1570,7 @@ hibernate_read_image(union hibernate_info *hib)
/* Map chunktable pages */
for (i = 0; i < HIBERNATE_CHUNK_TABLE_SIZE; i += PAGE_SIZE)
pmap_kenter_pa(chunktable + i, piglet_chunktable + i,
- VM_PROT_READ | VM_PROT_WRITE);
+ PROT_READ | PROT_WRITE);
pmap_update(pmap_kernel());
/* Read the chunktable from disk into the piglet chunktable */
@@ -1665,7 +1665,7 @@ hibernate_read_chunks(union hibernate_info *hib, paddr_t pig_start,
for(i = 0; i < 24 ; i++)
pmap_kenter_pa(hibernate_fchunk_area + (i * PAGE_SIZE),
piglet_base + ((4 + i) * PAGE_SIZE),
- VM_PROT_READ | VM_PROT_WRITE);
+ PROT_READ | PROT_WRITE);
pmap_update(pmap_kernel());
nchunks = hib->chunk_ctr;
@@ -1725,8 +1725,8 @@ hibernate_read_chunks(union hibernate_info *hib, paddr_t pig_start,
/* Map pages for this read */
for (j = 0; j < num_io_pages; j ++)
pmap_kenter_pa(tempva + j * PAGE_SIZE,
- img_cur + j * PAGE_SIZE,
- VM_PROT_READ | VM_PROT_WRITE);
+ img_cur + j * PAGE_SIZE,
+ PROT_READ | PROT_WRITE);
pmap_update(pmap_kernel());
@@ -1796,7 +1796,7 @@ hibernate_suspend(void)
hib.image_offset, ctod(end) - ctod(start));
pmap_kenter_pa(HIBERNATE_HIBALLOC_PAGE, HIBERNATE_HIBALLOC_PAGE,
- VM_PROT_READ | VM_PROT_WRITE);
+ PROT_READ | PROT_WRITE);
pmap_activate(curproc);
DPRINTF("hibernate: writing chunks\n");