Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/vax/include Pullup 1.17 by patch [ragge]:



details:   https://anonhg.NetBSD.org/src/rev/8c6d39419d63
branches:  netbsd-1-5
changeset: 489772:8c6d39419d63
user:      tv <tv%NetBSD.org@localhost>
date:      Tue Oct 17 01:41:32 2000 +0000

description:
Pullup 1.17 by patch [ragge]:
By accident, a previously unused bit in the PTE got used as wired bit.
Because of this kvtophys() of wired pages did set the leftmost bit, causing
the pager to hang while swapping. This is now fixed by using another
free bit in the PTE as wired bit instead.
This fixes PR#11121.

diffstat:

 sys/arch/vax/include/pte.h |  52 ++++++++++++++++++++++-----------------------
 1 files changed, 25 insertions(+), 27 deletions(-)

diffs (91 lines):

diff -r 9788e89a7ac3 -r 8c6d39419d63 sys/arch/vax/include/pte.h
--- a/sys/arch/vax/include/pte.h        Tue Oct 17 01:34:47 2000 +0000
+++ b/sys/arch/vax/include/pte.h        Tue Oct 17 01:41:32 2000 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: pte.h,v 1.14 2000/05/27 21:17:06 ragge Exp $      */
+/*      $NetBSD: pte.h,v 1.14.2.1 2000/10/17 01:41:32 tv Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -39,13 +39,12 @@
  */
 struct pte {
        unsigned int    pg_pfn:21;      /* Page Frame Number or 0 */
-       unsigned int    pg_u:1;         /* Uniform bit, does WHAT?? XXX */
-       unsigned int    pg_w:1;         /* Wired bit */
+       unsigned int    pg_illegal:2;   /* Don't use this bits */
        unsigned int    pg_sref:1;      /* Help for ref simulation */
-       unsigned int    pg_ref:1;       /* Simulated reference bit */
+       unsigned int    pg_w:1;         /* Wired bit */
        unsigned int    pg_z:1;         /* Zero DIGITAL = 0 */
-       unsigned int    pg_m:1;         /* Modify DIGITAL */
-       unsigned int    pg_prot:4;      /* reserved at zero */
+       unsigned int    pg_m:1;         /* Modify DIGITAL */
+       unsigned int    pg_prot:4;      /* reserved at zero */
        unsigned int    pg_v:1;         /* valid bit */
 };
 
@@ -54,24 +53,23 @@
 
 #endif _LOCORE
 
-#define        PT_ENTRY_NULL   ((pt_entry_t *) 0)
+#define PT_ENTRY_NULL  ((pt_entry_t *) 0)
 
-#define PG_V            0x80000000
-#define PG_NV           0x00000000
-#define PG_PROT         0x78000000
-#define PG_RW           0x20000000
-#define PG_KW           0x10000000
-#define PG_KR           0x18000000
-#define        PG_URKW         0x70000000
-#define PG_RO           0x78000000
-#define PG_NONE         0x00000000
-#define PG_M            0x04000000
-#define PG_REF          0x01000000
-#define PG_SREF         0x00800000
-#define PG_W            0x00400000
-#define PG_U            0x00200000
-#define PG_FRAME        0x001fffff
-#define        PG_PFNUM(x)     (((unsigned long)(x) & 0x3ffffe00) >> VAX_PGSHIFT)
+#define PG_V           0x80000000
+#define PG_NV          0x00000000
+#define PG_PROT                0x78000000
+#define PG_RW          0x20000000
+#define PG_KW          0x10000000
+#define PG_KR          0x18000000
+#define PG_URKW                0x70000000
+#define PG_RO          0x78000000
+#define PG_NONE                0x00000000
+#define PG_M           0x04000000
+#define PG_W           0x01000000
+#define PG_SREF                0x00800000
+#define PG_ILLEGAL     0x00600000
+#define PG_FRAME       0x001fffff
+#define PG_PFNUM(x)    (((unsigned long)(x) & 0x3ffffe00) >> VAX_PGSHIFT)
 
 #ifndef _LOCORE
 extern pt_entry_t *Sysmap;
@@ -86,18 +84,18 @@
        asm("extzv $9,$21,%1,%0;moval *_Sysmap[%0],%0" : "=r"(r) : "g"(va)); \
        r; \
 })
-#define        kvtophys(va) ({ \
+#define kvtophys(va) ({ \
        long r; \
        asm("extzv $9,$21,%1,%0;ashl $9,*_Sysmap[%0],%0;insv %1,$0,$9,%0" \
            : "&=r"(r) : "g"(va) : "cc"); \
        r; \
 })
 #else /* __GNUC__ */
-#define        kvtophys(va) \
+#define kvtophys(va) \
        (((kvtopte(va))->pg_pfn << VAX_PGSHIFT) | ((int)(va) & VAX_PGOFSET))
-#define        kvtopte(va) (&Sysmap[PG_PFNUM(va)])
+#define kvtopte(va) (&Sysmap[PG_PFNUM(va)])
 #endif /* __GNUC__ */
-#define        uvtopte(va, pcb) \
+#define uvtopte(va, pcb) \
        (((unsigned)va < 0x40000000) ? \
        &((pcb->P0BR)[PG_PFNUM(va)]) : \
        &((pcb->P1BR)[PG_PFNUM(va)]))



Home | Main Index | Thread Index | Old Index