Source-Changes-HG archive

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

[src/sommerfeld_i386mp_1]: src/sys/arch/i386/i386 If LOCKDEBUG, initialize pv...



details:   https://anonhg.NetBSD.org/src/rev/46510cd9b8d7
branches:  sommerfeld_i386mp_1
changeset: 482272:46510cd9b8d7
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Sat Aug 19 17:27:28 2000 +0000

description:
If LOCKDEBUG, initialize pvh locks.

diffstat:

 sys/arch/i386/i386/pmap.c |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r a8e3bcc8ee1f -r 46510cd9b8d7 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Fri Aug 18 14:01:11 2000 +0000
+++ b/sys/arch/i386/i386/pmap.c Sat Aug 19 17:27:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.83.2.9 2000/08/18 03:22:48 sommerfeld Exp $ */
+/*     $NetBSD: pmap.c,v 1.83.2.10 2000/08/19 17:27:28 sommerfeld Exp $        */
 
 /*
  *
@@ -1089,6 +1089,25 @@
                addr = (vaddr_t)(vm_physmem[lcv].pmseg.attrs +
                                 (vm_physmem[lcv].end - vm_physmem[lcv].start));
        }
+#ifdef LOCKDEBUG
+       /*
+        * Now, initialize all the pv_head locks.
+        * We only do this if LOCKDEBUG because we know that initialized locks
+        * are always all-zero if !LOCKDEBUG.
+        */
+       for (lcv = 0; lcv < vm_nphysseg ; lcv++) {
+               int off, npages;
+               struct pmap_physseg *pmsegp;
+               
+               npages = vm_physmem[lcv].end - vm_physmem[lcv].start;
+               printf("bank %d has %d pages\n", lcv, npages);
+               pmsegp = &vm_physmem[lcv].pmseg;
+               
+               for (off = 0; off <npages; off++)
+                       simple_lock_init(&pmsegp->pvhead[off].pvh_lock);
+               
+       }
+#endif
 
        /*
         * now we need to free enough pv_entry structures to allow us to get



Home | Main Index | Thread Index | Old Index