Source-Changes-HG archive

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

[src/fvdl-softdep]: src/sys Sync with -current.



details:   https://anonhg.NetBSD.org/src/rev/7be949f00c4d
branches:  fvdl-softdep
changeset: 477516:7be949f00c4d
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sun Nov 14 23:39:00 1999 +0000

description:
Sync with -current.

diffstat:

 sys/Makefile                             |    5 +-
 sys/adosfs/advfsops.c                    |    4 +-
 sys/arch/alpha/alpha/locore.s            |   73 +++-
 sys/arch/alpha/alpha/pmap.c              |  453 +++++++++++++++++++++---------
 sys/arch/alpha/alpha/vm_machdep.c        |    6 +-
 sys/arch/alpha/common/bus_dma.c          |    8 +-
 sys/arch/alpha/conf/ALPHA                |   11 +-
 sys/arch/alpha/conf/ENIWETOK             |  106 ++++--
 sys/arch/alpha/conf/GENERIC              |   20 +-
 sys/arch/alpha/conf/INSTALL              |   10 +-
 sys/arch/alpha/conf/TCWSCONS             |    7 +-
 sys/arch/alpha/include/elf_machdep.h     |    8 +-
 sys/arch/alpha/pci/a12c.c                |    9 +-
 sys/arch/alpha/pci/apecs.c               |    7 +-
 sys/arch/alpha/pci/cia.c                 |    9 +-
 sys/arch/alpha/pci/ciavar.h              |    7 +-
 sys/arch/alpha/pci/dwlpx.c               |    7 +-
 sys/arch/alpha/pci/lca.c                 |    7 +-
 sys/arch/alpha/pci/mcpcia.c              |    7 +-
 sys/arch/alpha/pci/sio.c                 |    8 +-
 sys/arch/alpha/pci/tsc.c                 |    7 +-
 sys/arch/alpha/stand/common/blkdev.c     |    2 +-
 sys/arch/alpha/stand/common/boot.c       |    2 +-
 sys/arch/alpha/stand/common/booted_dev.c |    2 +-
 sys/arch/alpha/stand/common/bootxx.c     |    2 +-
 sys/arch/alpha/stand/netboot/dev_net.c   |    2 +-
 sys/arch/alpha/stand/netboot/if_prom.c   |    2 +-
 sys/arch/alpha/tc/ioasic.c               |   27 +-
 sys/arch/alpha/tc/tcds.c                 |    6 +-
 sys/arch/amiga/amiga/amiga_init.c        |    4 +-
 sys/arch/amiga/amiga/machdep.c           |    6 +-
 sys/arch/amiga/amiga/mem.c               |    4 +-
 sys/arch/amiga/amiga/pmap.c              |   23 +-
 sys/arch/amiga/amiga/vm_machdep.c        |    9 +-
 34 files changed, 570 insertions(+), 300 deletions(-)

diffs (truncated from 2092 to 300 lines):

diff -r e0ec86ccd887 -r 7be949f00c4d sys/Makefile
--- a/sys/Makefile      Wed Nov 03 23:40:30 1999 +0000
+++ b/sys/Makefile      Sun Nov 14 23:39:00 1999 +0000
@@ -1,11 +1,10 @@
-#      $NetBSD: Makefile,v 1.36 1999/07/01 08:12:45 itojun Exp $
+#      $NetBSD: Makefile,v 1.36.4.1 1999/11/14 23:39:00 fvdl Exp $
 
 SUBDIR=        adosfs arch compat dev filecorefs isofs miscfs msdosfs net \
        netatalk netccitt netinet netinet6 netiso netkey netnatm netns \
        nfs ntfs sys ufs uvm vm
 
-.if (${MACHINE_ARCH} != "powerpc" && \
-    ${MACHINE_ARCH} != "mipseb" && ${MACHINE_ARCH} != "mipsel")
+.if (${MACHINE_ARCH} != "mipseb" && ${MACHINE_ARCH} != "mipsel")
 
 SUBDIR+= lkm
 
diff -r e0ec86ccd887 -r 7be949f00c4d sys/adosfs/advfsops.c
--- a/sys/adosfs/advfsops.c     Wed Nov 03 23:40:30 1999 +0000
+++ b/sys/adosfs/advfsops.c     Sun Nov 14 23:39:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: advfsops.c,v 1.38.4.1 1999/10/26 19:15:15 fvdl Exp $   */
+/*     $NetBSD: advfsops.c,v 1.38.4.2 1999/11/14 23:39:02 fvdl Exp $   */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -299,6 +299,8 @@
        if ((error = vflush(mp, NULLVP, flags)) != 0)
                return (error);
        amp = VFSTOADOSFS(mp);
+       if (amp->devvp->v_type != VBAD)
+               devvp->v_specmountpoint = NULL;
        vn_lock(amp->devvp, LK_EXCLUSIVE | LK_RETRY);
        error = VOP_CLOSE(amp->devvp, FREAD, NOCRED, p);
        vput(amp->devvp);
diff -r e0ec86ccd887 -r 7be949f00c4d sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s     Wed Nov 03 23:40:30 1999 +0000
+++ b/sys/arch/alpha/alpha/locore.s     Sun Nov 14 23:39:00 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.65 1999/09/17 19:59:35 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.65.4.1 1999/11/14 23:39:04 fvdl Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
 
 #include <machine/asm.h>
 
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.65 1999/09/17 19:59:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.65.4.1 1999/11/14 23:39:04 fvdl Exp $");
 
 #ifndef EVCNT_COUNTERS
 #include <machine/intrcnt.h>
@@ -396,7 +396,7 @@
        ldq     t0, 0(t0)
        ldq     t1, RPB_PRIMARY_CPU_ID(t0)
        cmpeq   t1, v0, t0
-       beq     t0, 4f                          /* == 0: bail out now */
+       beq     t0, 5f                          /* == 0: bail out now */
 #endif
 
        ldq     s1, (FRAME_PS * 8)(sp)          /* get the saved PS */
@@ -404,32 +404,25 @@
        bne     t0, 4f                          /* != 0: can't do AST or SIR */
 
        /* see if we can do an SIR */
-       ldq     t1, ssir                        /* SIR pending? */
-       beq     t1, 2f                          /* no, try an AST*/
-
-       /* We've got a SIR. */
-       CALL(do_sir)                            /* do the SIR; lowers IPL */
+2:     ldq     t1, ssir                        /* SIR pending? */
+       bne     t1, 5f                          /* yes */
+       /* no */
 
-       /* Check for AST */
-2:     ldiq    a0, ALPHA_PSL_IPL_0             /* drop IPL to zero*/
-       call_pal PAL_OSF1_swpipl
-
-       and     s1, ALPHA_PSL_USERMODE, t0      /* are we returning to user? */
+       /* check for AST */
+3:     and     s1, ALPHA_PSL_USERMODE, t0      /* are we returning to user? */
        beq     t0, 4f                          /* no: just return */
+       /* yes */
 
        ldq     t2, astpending                  /* AST pending? */
-       beq     t2, 3f                          /* no: return & deal with FP */
-
-       /* We've got an AST.  Handle it. */
-       mov     sp, a0                          /* only arg is frame */
-       CALL(ast)
-
+       bne     t2, 6f                          /* yes */
+       /* no: return & deal with FP */
 
        /*
-        * enable FPU based on whether the current proc is fpcurproc.
-        * Note: GET_*() clobbers v0, t0, t8...t11.
+        * We are going back to usermode.  Enable the FPU based on whether
+        * the current proc is fpcurproc.  Note: GET_*() clobbers v0, t0,
+        * t8...t11.
         */
-3:     GET_CURPROC(t1)
+       GET_CURPROC(t1)
        ldq     t1, 0(t1)
        GET_FPCURPROC(t2)
        ldq     t2, 0(t2)
@@ -438,8 +431,8 @@
        cmovne  t1, 1, a0
        call_pal PAL_OSF1_wrfen
 
-4:     /* restore the registers, and return */
-       bsr     ra, exception_restore_regs      /* jmp/CALL trashes pv/t12 */
+       /* restore the registers, and return */
+4:     bsr     ra, exception_restore_regs      /* jmp/CALL trashes pv/t12 */
        ldq     ra,(FRAME_RA*8)(sp)
        .set noat
        ldq     at_reg,(FRAME_AT*8)(sp)
@@ -447,6 +440,32 @@
        lda     sp,(FRAME_SW_SIZE*8)(sp)
        call_pal PAL_OSF1_rti
        .set at
+       /* NOTREACHED */
+
+       /* We've got a SIR */
+5:     ldiq    a0, ALPHA_PSL_IPL_SOFT
+       call_pal PAL_OSF1_swpipl
+       mov     v0, s2                          /* remember old IPL */
+       CALL(do_sir)
+
+       /* SIR handled; restore IPL and check again */
+       mov     s2, a0
+       call_pal PAL_OSF1_swpipl
+       br      2b
+
+       /* We've got an AST */
+6:     ldiq    a0, ALPHA_PSL_IPL_0             /* drop IPL to zero */
+       call_pal PAL_OSF1_swpipl
+       mov     v0, s2                          /* remember old IPL */
+
+       mov     sp, a0                          /* only arg is frame */
+       CALL(ast)
+
+       /* AST handled; restore IPL and check again */
+       mov     s2, a0
+       call_pal PAL_OSF1_swpipl
+       br      3b
+
        END(exception_return)
 
 LEAF(exception_save_regs, 0)
@@ -1058,7 +1077,9 @@
        LDGP(pv)
 
        mov     a2, t0                  /* t0 = i = len */
-       beq     a2, 2f                  /* if (len == 0), bail out */
+       bne     a2, 1f                  /* if (len != 0), proceed */
+       ldiq    t1, 1                   /* else bail */
+       br      zero, 2f
 
 1:     ldq_u   t1, 0(a0)               /* t1 = *from */
        extbl   t1, a0, t1
@@ -1079,7 +1100,7 @@
        stq     t0, 0(a3)
 3:     beq     t1, 4f                  /* *from == '\0'; leave quietly */
 
-       ldiq    v0, ENAMETOOLONG                /* *from != '\0'; error. */
+       ldiq    v0, ENAMETOOLONG        /* *from != '\0'; error. */
        RET
 
 4:     mov     zero, v0                /* return 0. */
diff -r e0ec86ccd887 -r 7be949f00c4d sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Wed Nov 03 23:40:30 1999 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Sun Nov 14 23:39:00 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.111 1999/09/12 01:16:56 chs Exp $ */
+/* $NetBSD: pmap.c,v 1.111.4.1 1999/11/14 23:39:08 fvdl Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -154,7 +154,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111 1999/09/12 01:16:56 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111.4.1 1999/11/14 23:39:08 fvdl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -443,7 +443,7 @@
        struct simplelock pq_slock;     /* spin lock on queue */
 } pmap_tlb_shootdown_q[ALPHA_MAXPROCS];
 
-/* If we have more pending jobs than this, we just nail the while TLB. */
+/* If we have more pending jobs than this, we just nail the whole TLB. */
 #define        PMAP_TLB_SHOOTDOWN_MAXJOBS      6
 
 struct pool pmap_tlb_shootdown_job_pool;
@@ -470,29 +470,43 @@
 }
 
 /*
+ * Optional argument passed to pmap_remove_mapping() for stealing mapping
+ * resources.
+ */
+struct prm_thief {
+       int     prmt_flags;             /* flags; what to steal */
+       struct pv_entry *prmt_pv;       /* the stolen PV entry */
+       pt_entry_t *prmt_ptp;           /* the stolen PT page */
+};
+
+#define        PRMT_PV         0x0001          /* steal the PV entry */
+#define        PRMT_PTP        0x0002          /* steal the PT page */
+
+/*
  * Internal routines
  */
 void   alpha_protection_init __P((void));
 boolean_t pmap_remove_mapping __P((pmap_t, vaddr_t, pt_entry_t *,
-           boolean_t, long, struct pv_entry **));
+           boolean_t, long, struct prm_thief *));
 void   pmap_changebit __P((paddr_t, pt_entry_t, pt_entry_t, long));
 
 /*
  * PT page management functions.
  */
-void   pmap_lev1map_create __P((pmap_t, long));
+int    pmap_lev1map_create __P((pmap_t, long));
 void   pmap_lev1map_destroy __P((pmap_t, long));
-void   pmap_ptpage_alloc __P((pmap_t, pt_entry_t *, int));
-void   pmap_ptpage_free __P((pmap_t, pt_entry_t *));
-void   pmap_l3pt_delref __P((pmap_t, vaddr_t, pt_entry_t *, pt_entry_t *,
-           pt_entry_t *, long));
+int    pmap_ptpage_alloc __P((pmap_t, pt_entry_t *, int));
+boolean_t pmap_ptpage_steal __P((pmap_t, int, paddr_t *));
+void   pmap_ptpage_free __P((pmap_t, pt_entry_t *, pt_entry_t **));
+void   pmap_l3pt_delref __P((pmap_t, vaddr_t, pt_entry_t *, long,
+           pt_entry_t **));
 void   pmap_l2pt_delref __P((pmap_t, pt_entry_t *, pt_entry_t *, long));
 void   pmap_l1pt_delref __P((pmap_t, pt_entry_t *, long));
 
 /*
  * PV table management functions.
  */
-void   pmap_pv_enter __P((pmap_t, paddr_t, vaddr_t, pt_entry_t *, boolean_t));
+int    pmap_pv_enter __P((pmap_t, paddr_t, vaddr_t, pt_entry_t *, boolean_t));
 void   pmap_pv_remove __P((pmap_t, paddr_t, vaddr_t, boolean_t,
            struct pv_entry **));
 struct pv_entry *pmap_pv_alloc __P((void));
@@ -1346,10 +1360,10 @@
 {
        struct pv_head *pvh;
        pv_entry_t pv, nextpv;
-       int s, ps;
        boolean_t needisync = FALSE;
        long cpu_id = alpha_pal_whami();
        paddr_t pa = VM_PAGE_TO_PHYS(pg);
+       int ps;
 
 #ifdef DEBUG
        if ((pmapdebug & (PDB_FOLLOW|PDB_PROTECT)) ||
@@ -1388,7 +1402,6 @@
        pvh = pa_to_pvh(pa);
        PMAP_HEAD_TO_MAP_LOCK();
        simple_lock(&pvh->pvh_slock);
-       s = splimp();                   /* XXX needed? */
        for (pv = LIST_FIRST(&pvh->pvh_list); pv != NULL; pv = nextpv) {
                struct pmap *pmap = pv->pv_pmap;
 
@@ -1414,7 +1427,6 @@
 #endif
                PMAP_UNLOCK(pmap, ps);
        }
-       splx(s);
 
        if (needisync)
                alpha_pal_imb();
@@ -1528,14 +1540,13 @@
  *     or lose information.  That is, this routine must actually
  *     insert this page into the given map NOW.
  */
-void
-pmap_enter(pmap, va, pa, prot, wired, access_type)
+int
+pmap_enter(pmap, va, pa, prot, flags)
        pmap_t pmap;
        vaddr_t va;
        paddr_t pa;
        vm_prot_t prot;
-       boolean_t wired;
-       vm_prot_t access_type;
+       int flags;
 {
        boolean_t managed;
        pt_entry_t *pte, npte, opte;
@@ -1544,20 +1555,22 @@
        boolean_t hadasm = FALSE;       /* XXX gcc -Wuninitialized */
        boolean_t needisync;
        boolean_t isactive;
+       boolean_t wired;



Home | Main Index | Thread Index | Old Index