summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_sh.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2012-07-09 08:43:10 +0000
committerderaadt <deraadt@openbsd.org>2012-07-09 08:43:10 +0000
commitc7e85a67ba3b4e96d46b33ba6390c3a1acab147b (patch)
treeccaf1a036ea4527b4d173bb4812f7c825d5a02c7 /lib/libkvm/kvm_sh.c
parentuse PAGE_SHIFT instead of PGSHIFT, in preperation for future (diff)
downloadwireguard-openbsd-c7e85a67ba3b4e96d46b33ba6390c3a1acab147b.tar.xz
wireguard-openbsd-c7e85a67ba3b4e96d46b33ba6390c3a1acab147b.zip
Use the PAGE_* forms (instead of the ancient BSD forms) in param.h,
because param.h will get a kick in the head sometime in the future. One day, maybe both can become invisible, but we boot one of them first. ok guenter
Diffstat (limited to 'lib/libkvm/kvm_sh.c')
-rw-r--r--lib/libkvm/kvm_sh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_sh.c b/lib/libkvm/kvm_sh.c
index 0797b20aa18..4a5ccc3c24f 100644
--- a/lib/libkvm/kvm_sh.c
+++ b/lib/libkvm/kvm_sh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_sh.c,v 1.3 2011/04/10 11:51:57 miod Exp $ */
+/* $OpenBSD: kvm_sh.c,v 1.4 2012/07/09 08:43:10 deraadt Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
@@ -58,7 +58,7 @@ _kvm_initvtop(kvm_t *kd)
#define __PMAP_PTP_SHIFT 22
#define __PMAP_PTP_PG_N (PAGE_SIZE / sizeof(pt_entry_t))
#define __PMAP_PTP_INDEX(va) (((va) >> __PMAP_PTP_SHIFT) & (__PMAP_PTP_N - 1))
-#define __PMAP_PTP_OFSET(va) ((va >> PGSHIFT) & (__PMAP_PTP_PG_N - 1))
+#define __PMAP_PTP_OFSET(va) ((va >> PAGE_SHIFT) & (__PMAP_PTP_PG_N - 1))
int
_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa)