summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2020-11-07 16:12:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2020-11-07 16:12:21 +0000
commit6535ae6d9f58ae9652905f2922b723672859dbe6 (patch)
treead40030a990d7480a1df7a6e1b90cfe7a8e976d5 /sys/arch/alpha
parent93b69f37590f5966b52111c526e701a0e27a7fa9 (diff)
multiple reads of pmap_emulate_reference() don't show any reason for it
to need KERNE_LOCK. Been testing this for about 3 weeks.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/trap.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index 3f22b64d3c6..2fd696df0a5 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.98 2020/10/27 03:09:08 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.99 2020/11/07 16:12:20 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -223,7 +223,7 @@ trap(a0, a1, a2, entry, framep)
struct trapframe *framep;
{
struct proc *p;
- int i, gotlock = 0;
+ int i;
u_int64_t ucode;
int user;
#if defined(DDB)
@@ -376,13 +376,10 @@ trap(a0, a1, a2, entry, framep)
case ALPHA_MMCSR_FOR:
case ALPHA_MMCSR_FOE:
case ALPHA_MMCSR_FOW:
- KERNEL_LOCK();
if (pmap_emulate_reference(p, a0, user, a1)) {
access_type = PROT_EXEC;
- gotlock = 1;
goto do_fault;
}
- KERNEL_UNLOCK();
goto out;
case ALPHA_MMCSR_INVALTRANS:
@@ -427,8 +424,7 @@ do_fault:
onfault = p->p_addr->u_pcb.pcb_onfault;
p->p_addr->u_pcb.pcb_onfault = 0;
- if (!gotlock)
- KERNEL_LOCK();
+ KERNEL_LOCK();
rv = uvm_fault(map, va, 0, access_type);
KERNEL_UNLOCK();