summaryrefslogtreecommitdiff
path: root/sys/arch/vax/include
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-31 08:33:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-01-31 08:33:38 +0000
commit3188e57db7fbe33178074568261e917f50a9f47c (patch)
tree3525ca8464dc20c586da143fe4aed5de5b37259b /sys/arch/vax/include
parent5e4fbe8e5ce671b087c6f42ba030a69620dbd254 (diff)
from ragge; add uvtopte() macro, to get user pte address easily
Diffstat (limited to 'sys/arch/vax/include')
-rw-r--r--sys/arch/vax/include/pte.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/vax/include/pte.h b/sys/arch/vax/include/pte.h
index fb5bd91a5aa..1251b7fc61a 100644
--- a/sys/arch/vax/include/pte.h
+++ b/sys/arch/vax/include/pte.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.6 1995/11/12 14:40:26 ragge Exp $ */
+/* $NetBSD: pte.h,v 1.7 1996/01/28 12:31:24 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -86,3 +86,7 @@ extern pt_entry_t *Sysmap;
((((pt_entry_t *)(pt) - Sysmap) << PGSHIFT) + 0x80000000)
#define kvtophys(va) \
(((kvtopte(va))->pg_pfn << PGSHIFT) | ((int)(va) & PGOFSET))
+#define uvtopte(va, pcb) \
+ (((unsigned)va < 0x40000000) || ((unsigned)va > 0x40000000) ? \
+ &((pcb->P0BR)[(unsigned)va >> PGSHIFT]) : \
+ &((pcb->P1BR)[((unsigned)va & 0x3fffffff) >> PGSHIFT]))