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 Teach pmap_extract about supersections.



details:   https://anonhg.NetBSD.org/src/rev/7b63e9abbdc8
branches:  trunk
changeset: 781274:7b63e9abbdc8
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Aug 30 02:05:56 2012 +0000

description:
Teach pmap_extract about supersections.

diffstat:

 sys/arch/arm/arm32/pmap.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r b9fbefa68dc7 -r 7b63e9abbdc8 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Thu Aug 30 01:27:44 2012 +0000
+++ b/sys/arch/arm/arm32/pmap.c Thu Aug 30 02:05:56 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.234 2012/08/29 18:56:45 matt Exp $  */
+/*     $NetBSD: pmap.c,v 1.235 2012/08/30 02:05:56 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.234 2012/08/29 18:56:45 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.235 2012/08/30 02:05:56 matt Exp $");
 
 #ifdef PMAP_DEBUG
 
@@ -3516,7 +3516,12 @@
                 */
                KDASSERT(pm == pmap_kernel());
                pmap_release_pmap_lock(pm);
-               pa = (l1pd & L1_S_FRAME) | (va & L1_S_OFFSET);
+#if (ARM_MMU_V6 + ARM_MMU_V7) > 0
+               if (l1pte_supersection_p(l1pd)) {
+                       pa = (l1pd & L1_SS_FRAME) | (va & L1_SS_OFFSET);
+               } else
+#endif
+                       pa = (l1pd & L1_S_FRAME) | (va & L1_S_OFFSET);
        } else {
                /*
                 * Note that we can't rely on the validity of the L1
@@ -5319,6 +5324,7 @@
        pde = *pdep;
 
        if (l1pte_section_p(pde)) {
+               __CTASSERT((L1_S_CACHE_MASK & L1_S_V6_SUPER) == 0);
                if ((pde & L1_S_CACHE_MASK) != pte_l1_s_cache_mode_pt) {
                        *pdep = (pde & ~L1_S_CACHE_MASK) |
                            pte_l1_s_cache_mode_pt;



Home | Main Index | Thread Index | Old Index