From 4e0a2def069c77dab9a657353b52220424a69dd4 Mon Sep 17 00:00:00 2001 From: David Xu Date: Fri, 8 Nov 2002 03:07:52 +0000 Subject: [PATCH] adjust critical section to only wrap around vm86_bioscall(). --- sys/i386/i386/vm86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/i386/i386/vm86.c b/sys/i386/i386/vm86.c index 3ca104dfe045..dd7624f7bb9a 100644 --- a/sys/i386/i386/vm86.c +++ b/sys/i386/i386/vm86.c @@ -603,7 +603,6 @@ vm86_datacall(intnum, vmf, vmc) int i, entry, retval; mtx_lock(&vm86_lock); - critical_enter(); for (i = 0; i < vmc->npages; i++) { page = vtophys(vmc->pmap[i].kva & PG_FRAME); entry = vmc->pmap[i].pte_num; @@ -613,14 +612,15 @@ vm86_datacall(intnum, vmf, vmc) } vmf->vmf_trapno = intnum; + critical_enter(); retval = vm86_bioscall(vmf); + critical_exit(); for (i = 0; i < vmc->npages; i++) { entry = vmc->pmap[i].pte_num; pte[entry] = vmc->pmap[i].old_pte; pmap_invalidate_page(kernel_pmap, vmc->pmap[i].kva); } - critical_exit(); mtx_unlock(&vm86_lock); return (retval);