Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/arch/arm/arm32 Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/1378e9b4e484
branches:  netbsd-7
changeset: 799182:1378e9b4e484
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Apr 10 20:17:52 2015 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #669):
        sys/arch/arm/arm32/pmap.c: revision 1.318
Fix two bugs.  pmap_is_cached fix for MULTIPROCESSOR (not just ASID on
local cpu -> any valid ASID on any cpu).
pmap_deactivate: update curcpu()->ci_pmap_cur_asid to KERNEL_PID too.

diffstat:

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

diffs (46 lines):

diff -r 752c60e16d93 -r 1378e9b4e484 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Fri Apr 10 20:15:52 2015 +0000
+++ b/sys/arch/arm/arm32/pmap.c Fri Apr 10 20:17:52 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.295.2.3 2014/11/10 19:57:26 martin Exp $    */
+/*     $NetBSD: pmap.c,v 1.295.2.4 2015/04/10 20:17:52 snj Exp $       */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -216,7 +216,7 @@
 #include <arm/locore.h>
 //#include <arm/arm32/katelib.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295.2.3 2014/11/10 19:57:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295.2.4 2015/04/10 20:17:52 snj Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -938,9 +938,18 @@
 pmap_is_cached(pmap_t pm)
 {
 #ifdef ARM_MMU_EXTENDED
+       if (pm == pmap_kernel())
+               return true;
+#ifdef MULTIPROCESSOR
+       // Is this pmap active on any CPU?
+       if (!kcpuset_iszero(pm->pm_active))
+               return true;
+#else
        struct pmap_tlb_info * const ti = cpu_tlb_info(curcpu());
-       if (pm == pmap_kernel() || PMAP_PAI_ASIDVALID_P(PMAP_PAI(pm, ti), ti))
+       // Is this pmap active?
+       if (PMAP_PAI_ASIDVALID_P(PMAP_PAI(pm, ti), ti))
                return true;
+#endif
 #else
        struct cpu_info * const ci = curcpu();
        if (pm == pmap_kernel() || ci->ci_pmap_lastuser == NULL
@@ -4949,6 +4958,7 @@
        pmap_tlb_asid_deactivate(pm);
        cpu_setttb(pmap_kernel()->pm_l1_pa, KERNEL_PID);
        ci->ci_pmap_cur = pmap_kernel();
+       ci->ci_pmap_asid_cur = KERNEL_PID;
        kpreempt_enable();
 #else
        /*



Home | Main Index | Thread Index | Old Index