Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/arch/vax/include pullup 1.11->1.12 (ragge): fix cri...



details:   https://anonhg.NetBSD.org/src/rev/4287a8706a49
branches:  netbsd-1-4
changeset: 469204:4287a8706a49
user:      perry <perry%NetBSD.org@localhost>
date:      Mon Jul 12 19:25:28 1999 +0000

description:
pullup 1.11->1.12 (ragge): fix critical paging/swapping problems

diffstat:

 sys/arch/vax/include/pte.h |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (36 lines):

diff -r a8d2be8605f2 -r 4287a8706a49 sys/arch/vax/include/pte.h
--- a/sys/arch/vax/include/pte.h        Mon Jul 12 19:24:42 1999 +0000
+++ b/sys/arch/vax/include/pte.h        Mon Jul 12 19:25:28 1999 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: pte.h,v 1.11 1999/01/01 21:43:18 ragge Exp $      */
+/*      $NetBSD: pte.h,v 1.11.2.1 1999/07/12 19:25:28 perry Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -71,7 +71,7 @@
 #define PG_W            0x00400000
 #define PG_U            0x00200000
 #define PG_FRAME        0x001fffff
-#define        PG_PFNUM(x)     ((x) >> VAX_PGSHIFT)
+#define        PG_PFNUM(x)     (((unsigned long)(x) & 0x3ffffe00) >> VAX_PGSHIFT)
 
 #ifndef _LOCORE
 extern pt_entry_t *Sysmap;
@@ -80,13 +80,12 @@
  */
 #endif
 
-#define        kvtopte(va) \
-       (&Sysmap[((unsigned)(va) & ~KERNBASE) >> VAX_PGSHIFT])
+#define        kvtopte(va) (&Sysmap[PG_PFNUM(va)])
 #define        ptetokv(pt) \
        ((((pt_entry_t *)(pt) - Sysmap) << VAX_PGSHIFT) + 0x80000000)
 #define        kvtophys(va) \
        (((kvtopte(va))->pg_pfn << VAX_PGSHIFT) | ((int)(va) & VAX_PGOFSET))
 #define        uvtopte(va, pcb) \
-       (((unsigned)va < 0x40000000) || ((unsigned)va > 0x80000000) ? \
-       &((pcb->P0BR)[(unsigned)va >> VAX_PGSHIFT]) : \
-       &((pcb->P1BR)[((unsigned)va & 0x3fffffff) >> VAX_PGSHIFT]))
+       (((unsigned)va < 0x40000000) ? \
+       &((pcb->P0BR)[PG_PFNUM(va)]) : \
+       &((pcb->P1BR)[PG_PFNUM(va)]))



Home | Main Index | Thread Index | Old Index