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 Add pmap locking to pmap_kenter_pa/kremove
details: https://anonhg.NetBSD.org/src/rev/580ce4b5ec49
branches: trunk
changeset: 807513:580ce4b5ec49
user: matt <matt%NetBSD.org@localhost>
date: Mon Apr 13 16:19:42 2015 +0000
description:
Add pmap locking to pmap_kenter_pa/kremove
diffstat:
sys/arch/arm/arm32/pmap.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (51 lines):
diff -r 5ada76b784aa -r 580ce4b5ec49 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Mon Apr 13 16:03:51 2015 +0000
+++ b/sys/arch/arm/arm32/pmap.c Mon Apr 13 16:19:42 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.319 2015/04/11 15:21:33 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.320 2015/04/13 16:19:42 matt Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -216,7 +216,7 @@
#include <arm/locore.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.319 2015/04/11 15:21:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.320 2015/04/13 16:19:42 matt Exp $");
//#define PMAP_DEBUG
#ifdef PMAP_DEBUG
@@ -3671,6 +3671,7 @@
}
pmap_t kpm = pmap_kernel();
+ pmap_acquire_pmap_lock(kpm);
struct l2_bucket * const l2b = pmap_get_l2_bucket(kpm, va);
const size_t l1slot __diagused = l1pte_index(va);
KASSERTMSG(l2b != NULL,
@@ -3718,6 +3719,7 @@
cpu_cpwait();
}
}
+ pmap_release_pmap_lock(kpm);
pt_entry_t npte = L2_S_PROTO | pa | L2_S_PROT(PTE_KERNEL, prot)
| ((flags & PMAP_NOCACHE)
@@ -3814,6 +3816,8 @@
const vaddr_t eva = va + len;
+ pmap_acquire_pmap_lock(pmap_kernel());
+
while (va < eva) {
vaddr_t next_bucket = L2_NEXT_BUCKET_VA(va);
if (next_bucket > eva)
@@ -3875,6 +3879,7 @@
total_mappings += mappings;
#endif
}
+ pmap_release_pmap_lock(pmap_kernel());
cpu_cpwait();
UVMHIST_LOG(maphist, " <--- done (%u mappings removed)",
total_mappings, 0, 0, 0);
Home |
Main Index |
Thread Index |
Old Index