Source-Changes-HG archive

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

[src/nathanw_sa]: src/sys Sync with HEAD.



details:   https://anonhg.NetBSD.org/src/rev/ee51a6b61a0a
branches:  nathanw_sa
changeset: 506557:ee51a6b61a0a
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Dec 11 16:11:17 2002 +0000

description:
Sync with HEAD.

diffstat:

 sys/arch/sparc/sparc/intr.c       |  28 ++++++++++++++++------------
 sys/lkm/vfs/coda/lkminit_vfs.c    |  12 ++++++------
 sys/lkm/vfs/ufs/lfs/lkminit_vfs.c |   6 +++---
 sys/ufs/lfs/lfs_balloc.c          |   8 +++++---
 4 files changed, 30 insertions(+), 24 deletions(-)

diffs (188 lines):

diff -r 13e038d18044 -r ee51a6b61a0a sys/arch/sparc/sparc/intr.c
--- a/sys/arch/sparc/sparc/intr.c       Wed Dec 11 16:00:50 2002 +0000
+++ b/sys/arch/sparc/sparc/intr.c       Wed Dec 11 16:11:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.56.4.5 2002/12/11 06:12:13 thorpej Exp $ */
+/*     $NetBSD: intr.c,v 1.56.4.6 2002/12/11 16:11:17 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -604,8 +604,8 @@
  * bit to set in the interrupt enable register with ienab_bis().
  */
 struct softintr_cookie {
-       int sic_pilreq;         /* MUST be first! */
-       int sic_level;
+       int sic_pilreq;         /* CPU-specific bits; MUST be first! */
+       int sic_pil;            /* Actual machine PIL that is used */
        struct intrhand sic_hand;
 };
 
@@ -632,6 +632,7 @@
        struct softintr_cookie *sic;
        struct intrhand *ih;
        int pilreq;
+       int pil;
 
        /*
         * On a sun4m, the processor interrupt level is stored
@@ -641,20 +642,23 @@
         * in the interrupt enable register is stored in
         * the softintr cookie to be passed to ienab_bis().
         */
-       pilreq = level;
+       pil = pilreq = level;
        if (CPU_ISSUN4 || CPU_ISSUN4C) {
                /* Select the most suitable of three available softint levels */
-               if (level >= 1 && level < 4)
+               if (level >= 1 && level < 4) {
+                       pil = 1;
                        pilreq = IE_L1;
-               else if (level >= 4 && level < 6)
+               } else if (level >= 4 && level < 6) {
+                       pil = 4;
                        pilreq = IE_L4;
-               else {
+               } else {
+                       pil = 6;
                        pilreq = IE_L6;
                }
        }
 
        sic = malloc(sizeof(*sic), M_DEVBUF, 0);
-       sic->sic_level = level;
+       sic->sic_pil = pil;
        sic->sic_pilreq = pilreq;
        ih = &sic->sic_hand;
        ih->ih_fun = (int (*) __P((void *)))fun;
@@ -668,13 +672,13 @@
         */
        ih->ih_classipl = (level << 8) & PSR_PIL;
 
-       if (fastvec & (1 << level)) {
+       if (fastvec & (1 << pil)) {
                printf("softintr_establish: untie fast vector at level %d\n",
-                   level);
+                   pil);
                uninst_fasttrap(level);
        }
 
-       ih_insert(&sintrhand[level], ih);
+       ih_insert(&sintrhand[pil], ih);
        return (void *)sic;
 }
 
@@ -688,7 +692,7 @@
 {
        struct softintr_cookie *sic = cookie;
 
-       ih_remove(&sintrhand[sic->sic_level], &sic->sic_hand);
+       ih_remove(&sintrhand[sic->sic_pil], &sic->sic_hand);
        free(cookie, M_DEVBUF);
 }
 
diff -r 13e038d18044 -r ee51a6b61a0a sys/lkm/vfs/coda/lkminit_vfs.c
--- a/sys/lkm/vfs/coda/lkminit_vfs.c    Wed Dec 11 16:00:50 2002 +0000
+++ b/sys/lkm/vfs/coda/lkminit_vfs.c    Wed Dec 11 16:11:17 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_vfs.c,v 1.2.6.2 2002/09/17 21:22:37 nathanw Exp $ */
+/* $NetBSD: lkminit_vfs.c,v 1.2.6.3 2002/12/11 16:14:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2.6.2 2002/09/17 21:22:37 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2.6.3 2002/12/11 16:14:08 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -97,19 +97,19 @@
 
        switch (cmd) {
        case LKM_E_LOAD:
-               lkmtp->private.lkm_any = (struct lkm_any *) &coda_lkm_dev;
+               lkmtp->private.lkm_any = (void *) &coda_lkm_dev;
                error = lkmdispatch(lkmtp, cmd);
                if (error)
                        break;
-               lkmtp->private.lkm_any = (struct lkm_any *) &coda_lkm_vfs ;
+               lkmtp->private.lkm_any = (void *) &coda_lkm_vfs ;
                error = lkmdispatch(lkmtp, cmd);
                break;
        case LKM_E_UNLOAD:
-               lkmtp->private.lkm_any = (struct lkm_any *) &coda_lkm_vfs ;
+               lkmtp->private.lkm_any = (void *) &coda_lkm_vfs ;
                error = lkmdispatch(lkmtp, cmd);
                if (error)
                        break;
-               lkmtp->private.lkm_any = (struct lkm_any *) &coda_lkm_dev;
+               lkmtp->private.lkm_any = (void *) &coda_lkm_dev;
                error = lkmdispatch(lkmtp, cmd);
                break;
        case LKM_E_STAT:
diff -r 13e038d18044 -r ee51a6b61a0a sys/lkm/vfs/ufs/lfs/lkminit_vfs.c
--- a/sys/lkm/vfs/ufs/lfs/lkminit_vfs.c Wed Dec 11 16:00:50 2002 +0000
+++ b/sys/lkm/vfs/ufs/lfs/lkminit_vfs.c Wed Dec 11 16:11:17 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_vfs.c,v 1.2.2.2 2002/05/29 21:33:21 nathanw Exp $ */
+/* $NetBSD: lkminit_vfs.c,v 1.2.2.3 2002/12/11 16:14:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2.2.2 2002/05/29 21:33:21 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_vfs.c,v 1.2.2.3 2002/12/11 16:14:10 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -108,7 +108,7 @@
 
        /* do this first, lkmdispatch() expects this to be already filled in */
        if (cmd == LKM_E_LOAD)
-               lkmtp->private.lkm_any = (struct lkm_any *)&_module;
+               lkmtp->private.lkm_any = (void *)&_module;
 
        if ((error = lkmdispatch(lkmtp, cmd)))
                return error;
diff -r 13e038d18044 -r ee51a6b61a0a sys/ufs/lfs/lfs_balloc.c
--- a/sys/ufs/lfs/lfs_balloc.c  Wed Dec 11 16:00:50 2002 +0000
+++ b/sys/ufs/lfs/lfs_balloc.c  Wed Dec 11 16:11:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_balloc.c,v 1.27.2.7 2002/08/01 02:47:03 nathanw Exp $      */
+/*     $NetBSD: lfs_balloc.c,v 1.27.2.8 2002/12/11 16:16:59 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.27.2.7 2002/08/01 02:47:03 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_balloc.c,v 1.27.2.8 2002/12/11 16:16:59 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -193,6 +193,8 @@
                        frags = numfrags(fs, nsize);
                        bb = fragstofsb(fs, frags);
                        *ap->a_bpp = bp = getblk(vp, lbn, nsize, 0, 0);
+                       if (ap->a_flags & B_CLRBUF)
+                               clrbuf(bp);
                        ip->i_lfs_effnblks += bb;
                        ip->i_lfs->lfs_bfree -= bb;
                        ip->i_ffs_db[lbn] = bp->b_blkno = UNWRITTEN;
@@ -289,7 +291,7 @@
         * disk address UNWRITTEN.
         */
        if (daddr == UNASSIGNED) {
-               if (iosize != fs->lfs_bsize)
+               if (ap->a_flags & B_CLRBUF)
                        clrbuf(bp);
                
                /* Note the new address */



Home | Main Index | Thread Index | Old Index