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 Fix two bugs. pmap_is_cached fix for MUL...
details: https://anonhg.NetBSD.org/src/rev/9d4accccc1d6
branches: trunk
changeset: 337233:9d4accccc1d6
user: matt <matt%NetBSD.org@localhost>
date: Tue Apr 07 20:36:21 2015 +0000
description:
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 8b56592e93b0 -r 9d4accccc1d6 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Tue Apr 07 18:02:11 2015 +0000
+++ b/sys/arch/arm/arm32/pmap.c Tue Apr 07 20:36:21 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.317 2015/02/25 13:52:42 joerg Exp $ */
+/* $NetBSD: pmap.c,v 1.318 2015/04/07 20:36:21 matt Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -215,7 +215,7 @@
#include <arm/locore.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.317 2015/02/25 13:52:42 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.318 2015/04/07 20:36:21 matt Exp $");
//#define PMAP_DEBUG
#ifdef PMAP_DEBUG
@@ -924,9 +924,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
@@ -4937,6 +4946,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