Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 If we get a fault we shouldn't have, set ...



details:   https://anonhg.NetBSD.org/src/rev/a94e036b4b93
branches:  trunk
changeset: 781727:a94e036b4b93
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Sep 26 18:18:08 2012 +0000

description:
If we get a fault we shouldn't have, set pmap_needs_pte_sync and retry.

diffstat:

 sys/arch/arm/arm32/pmap.c |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r f59e508f9d81 -r a94e036b4b93 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Wed Sep 26 15:33:43 2012 +0000
+++ b/sys/arch/arm/arm32/pmap.c Wed Sep 26 18:18:08 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.237 2012/09/22 00:33:37 matt Exp $  */
+/*     $NetBSD: pmap.c,v 1.238 2012/09/26 18:18:08 matt Exp $  */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -212,7 +212,7 @@
 #include <arm/cpuconf.h>
 #include <arm/arm32/katelib.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.237 2012/09/22 00:33:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.238 2012/09/26 18:18:08 matt Exp $");
 
 #ifdef PMAP_DEBUG
 
@@ -4002,6 +4002,17 @@
        }
 #endif /* CPU_SA110 */
 
+       /*
+        * If 'rv == 0' at this point, it generally indicates that there is a
+        * stale TLB entry for the faulting address.  That might be due to a
+        * wrong setting of pmap_needs_pte_sync.  So set it and retry.
+        */
+       if (rv == 0 && pm->pm_l1->l1_domain_use_count == 1
+           && pmap_needs_pte_sync == 0) {
+               pmap_needs_pte_sync = 1;
+               rv = 1;
+       }
+
 #ifdef DEBUG
        /*
         * If 'rv == 0' at this point, it generally indicates that there is a



Home | Main Index | Thread Index | Old Index