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/i386/i386 Pull up rev. 1.109 (via patch):



details:   https://anonhg.NetBSD.org/src/rev/7d5492d784da
branches:  netbsd-1-5
changeset: 489722:7d5492d784da
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Oct 09 04:46:00 2000 +0000

description:
Pull up rev. 1.109 (via patch):
Re-order the TLB operations in pmap_zero_page() and
pmap_zero_page_uncached().  This seems to prevent the
lossage with those functions people have seen on Cyrix
CPUs.

diffstat:

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

diffs (48 lines):

diff -r 833c404ec9db -r 7d5492d784da sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Mon Oct 09 02:41:28 2000 +0000
+++ b/sys/arch/i386/i386/pmap.c Mon Oct 09 04:46:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.94.2.2 2000/09/21 14:20:24 chs Exp $        */
+/*     $NetBSD: pmap.c,v 1.94.2.3 2000/10/09 04:46:00 thorpej Exp $    */
 
 /*
  *
@@ -2067,16 +2067,11 @@
 pmap_zero_page(pa)
        paddr_t pa;
 {
+
        simple_lock(&pmap_zero_page_lock);
-#ifdef DIAGNOSTIC
-       if (*zero_pte)
-               panic("pmap_zero_page: lock botch");
-#endif
-
        *zero_pte = (pa & PG_FRAME) | PG_V | PG_RW;     /* map in */
+       pmap_update_pg((vaddr_t)zerop);                 /* flush TLB */
        memset(zerop, 0, NBPG);                         /* zero */
-       *zero_pte = 0;                          /* zap! */
-       pmap_update_pg((vaddr_t)zerop);         /* flush TLB */
        simple_unlock(&pmap_zero_page_lock);
 }
 
@@ -2088,17 +2083,12 @@
 pmap_zero_page_uncached(pa)
        paddr_t pa;
 {
+
        simple_lock(&pmap_zero_page_lock);
-#ifdef DIAGNOSTIC
-       if (*zero_pte)
-               panic("pmap_zero_page_uncached: lock botch");
-#endif
-
        *zero_pte = (pa & PG_FRAME) | PG_V | PG_RW |    /* map in */
            ((cpu_class != CPUCLASS_386) ? PG_N : 0);
+       pmap_update_pg((vaddr_t)zerop);                 /* flush TLB */
        memset(zerop, 0, NBPG);                         /* zero */
-       *zero_pte = 0;                                  /* zap! */
-       pmap_update_pg((vaddr_t)zerop);                 /* flush TLB */
        simple_unlock(&pmap_zero_page_lock);
 }
 



Home | Main Index | Thread Index | Old Index