summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-07-20 00:16:17 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-07-20 00:16:17 +0000
commit8a49870cd556c39b2eb6cdac2a5f6a8b0829a9a3 (patch)
tree2c8d6907fdd18ceb30f6be181e040ee5f0140e8a /sys/arch
parent33f1c63c77858337d3f77837fc8e39d4b21869ab (diff)
Make pmap_remove() grab the kernel lock. This is a big hammer but makes MP
machines work again with the unlocked reaper. ok mpi@, deraadt@ no objection from miod@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/pmap.c4
-rw-r--r--sys/arch/powerpc/powerpc/pmap.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c
index 9f9f42a006c..fe5422e7e1a 100644
--- a/sys/arch/alpha/alpha/pmap.c
+++ b/sys/arch/alpha/alpha/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.77 2015/06/23 19:50:48 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.78 2015/07/20 00:16:16 kettenis Exp $ */
/* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */
/*-
@@ -1190,7 +1190,9 @@ pmap_remove(pmap_t pmap, vaddr_t sva, vaddr_t eva)
printf("pmap_remove(%p, %lx, %lx)\n", pmap, sva, eva);
#endif
+ KERNEL_LOCK();
pmap_do_remove(pmap, sva, eva, TRUE);
+ KERNEL_UNLOCK();
}
/*
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c
index 5857c501fb7..2155da5dcc6 100644
--- a/sys/arch/powerpc/powerpc/pmap.c
+++ b/sys/arch/powerpc/powerpc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.159 2015/06/05 10:15:54 mpi Exp $ */
+/* $OpenBSD: pmap.c,v 1.160 2015/07/20 00:16:16 kettenis Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
@@ -642,6 +642,7 @@ pmap_remove(pmap_t pm, vaddr_t sva, vaddr_t eva)
struct pte_desc *pted;
vaddr_t va;
+ KERNEL_LOCK();
PMAP_VP_LOCK(pm);
for (va = sva; va < eva; va += PAGE_SIZE) {
pted = pmap_vp_lookup(pm, va);
@@ -649,6 +650,7 @@ pmap_remove(pmap_t pm, vaddr_t sva, vaddr_t eva)
pmap_remove_pted(pm, pted);
}
PMAP_VP_UNLOCK(pm);
+ KERNEL_UNLOCK();
}
/*