summaryrefslogtreecommitdiff
path: root/lib/libkvm/kvm_m68k.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-07-09 08:43:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-07-09 08:43:11 +0000
commit14f21ce02b7b091d4bcd9ca422cc2f883cf503f8 (patch)
tree8cbb7b9a397c4b483368b1440d4fe37b8b659624 /lib/libkvm/kvm_m68k.c
parentb0cdb5566cbd25ac28f9e09ef2ac2bceb7df9aca (diff)
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_m68k.c')
-rw-r--r--lib/libkvm/kvm_m68k.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libkvm/kvm_m68k.c b/lib/libkvm/kvm_m68k.c
index c5fc38508b2..b66552b392f 100644
--- a/lib/libkvm/kvm_m68k.c
+++ b/lib/libkvm/kvm_m68k.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_m68k.c,v 1.19 2009/10/27 23:59:28 deraadt Exp $ */
+/* $OpenBSD: kvm_m68k.c,v 1.20 2012/07/09 08:43:10 deraadt Exp $ */
/* $NetBSD: kvm_m68k.c,v 1.9 1996/05/07 06:09:11 leo Exp $ */
/*-
@@ -67,8 +67,8 @@
#include <machine/kcore.h>
#ifndef btop
-#define btop(x) (((unsigned)(x)) >> PGSHIFT) /* XXX */
-#define ptob(x) ((caddr_t)((x) << PGSHIFT)) /* XXX */
+#define btop(x) (((unsigned)(x)) >> PAGE_SHIFT) /* XXX */
+#define ptob(x) ((caddr_t)((x) << PAGE_SHIFT)) /* XXX */
#endif
void
@@ -97,7 +97,7 @@ _kvm_vatop(kvm_t *kd, st_entry_t *sta, u_long va, u_long *pa)
_kvm_err(kd, 0, "vatop called in live kernel!");
return (0);
}
- offset = va & PGOFSET;
+ offset = va & PAGE_MASK;
cpu_kh = kd->cpu_data;
/*
* If we are initializing (kernel segment table pointer not yet set)
@@ -105,7 +105,7 @@ _kvm_vatop(kvm_t *kd, st_entry_t *sta, u_long va, u_long *pa)
*/
if (cpu_kh->sysseg_pa == 0) {
*pa = va + cpu_kh->kernel_pa;
- return (NBPG - offset);
+ return (PAGE_SIZE - offset);
}
if (cpu_kh->mmutype == MMU_68040 || cpu_kh->mmutype == MMU_68060) {
st_entry_t *sta2;
@@ -174,7 +174,7 @@ _kvm_vatop(kvm_t *kd, st_entry_t *sta, u_long va, u_long *pa)
}
*pa = addr + offset;
- return (NBPG - offset);
+ return (PAGE_SIZE - offset);
invalid:
_kvm_err(kd, 0, "invalid address (%lx)", va);
return (0);