From 9facf4a0d90f1ff7f9ca3f691c1b1ca11771f58e Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Wed, 25 Jun 1997 19:49:45 +0000 Subject: [PATCH] Block some interrupts during the call to pmap_zero_page in vm_page_zero_idle. This fixes some occurences of the problem reported in PR kern/3216: "panic: pmap_zero_page: CMAP busy" --- sys/amd64/amd64/vm_machdep.c | 4 +++- sys/i386/i386/vm_machdep.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 5ad743d9eaa..bc8ba256477 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.80 1997/05/07 20:19:18 peter Exp $ + * $Id: vm_machdep.c,v 1.81 1997/06/22 16:03:40 peter Exp $ */ #include "npx.h" @@ -921,7 +921,9 @@ vm_page_zero_idle() --(*vm_page_queues[m->queue].lcnt); TAILQ_REMOVE(vm_page_queues[m->queue].pl, m, pageq); splx(s); + (void)splvm(); pmap_zero_page(VM_PAGE_TO_PHYS(m)); + splx(s); (void)splvm(); m->queue = PQ_ZERO + m->pc; ++(*vm_page_queues[m->queue].lcnt); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 5ad743d9eaa..bc8ba256477 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.80 1997/05/07 20:19:18 peter Exp $ + * $Id: vm_machdep.c,v 1.81 1997/06/22 16:03:40 peter Exp $ */ #include "npx.h" @@ -921,7 +921,9 @@ vm_page_zero_idle() --(*vm_page_queues[m->queue].lcnt); TAILQ_REMOVE(vm_page_queues[m->queue].pl, m, pageq); splx(s); + (void)splvm(); pmap_zero_page(VM_PAGE_TO_PHYS(m)); + splx(s); (void)splvm(); m->queue = PQ_ZERO + m->pc; ++(*vm_page_queues[m->queue].lcnt);