diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2011-07-06 21:41:38 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2011-07-06 21:41:38 +0000 |
commit | 1f8bec9fc5270feedd8a624a9d95c12ca9f84541 (patch) | |
tree | 00106427be1dff3557a53963b35c56d2cbf075a2 /sys/arch/mips64 | |
parent | f303274e6cc4f87cb47de6f68f997d8a37c76e0f (diff) |
Clean up after P_BIGLOCK removal.
KERNEL_PROC_LOCK -> KERNEL_LOCK
KERNEL_PROC_UNLOCK -> KERNEL_UNLOCK
oga@ ok
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/mips64/fp_emulate.c | 6 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 60 |
2 files changed, 27 insertions, 39 deletions
diff --git a/sys/arch/mips64/mips64/fp_emulate.c b/sys/arch/mips64/mips64/fp_emulate.c index aaec0c96f20..f23f883a3e2 100644 --- a/sys/arch/mips64/mips64/fp_emulate.c +++ b/sys/arch/mips64/mips64/fp_emulate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fp_emulate.c,v 1.3 2010/11/24 21:16:28 miod Exp $ */ +/* $OpenBSD: fp_emulate.c,v 1.4 2011/07/06 21:41:37 art Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -385,9 +385,9 @@ deliver: if (sig != SIGBUS && sig != SIGSEGV) #endif sv.sival_ptr = (void *)pc; - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); trapsignal(p, sig, 0, fault_type, sv); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); } } diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 6e30ca2aa30..d7fb139f748 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.73 2011/04/03 14:56:28 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.74 2011/07/06 21:41:37 art Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -166,9 +166,9 @@ ast() p->p_md.md_astpending = 0; if (p->p_flag & P_OWEUPC) { - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); ADDUPROF(p); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); } if (ci->ci_want_resched) preempt(NULL); @@ -273,10 +273,7 @@ trap(struct trap_frame *trapframe) } entry |= PG_M; *pte = entry; - if (USERMODE(trapframe->sr)) - KERNEL_PROC_LOCK(p); - else - KERNEL_LOCK(); + KERNEL_LOCK(); pmap_update_user_page(pmap, (trapframe->badvaddr & ~PGOFSET), entry); pa = pfn_to_pad(entry); @@ -284,10 +281,7 @@ trap(struct trap_frame *trapframe) if (pg == NULL) panic("trap: utlbmod: unmanaged page"); pmap_set_modify(pg); - if (USERMODE(trapframe->sr)) - KERNEL_PROC_UNLOCK(p); - else - KERNEL_UNLOCK(); + KERNEL_UNLOCK(); if (!USERMODE(trapframe->sr)) return; goto out; @@ -351,10 +345,7 @@ fault_common: onfault = p->p_addr->u_pcb.pcb_onfault; p->p_addr->u_pcb.pcb_onfault = 0; - if (USERMODE(trapframe->sr)) - KERNEL_PROC_LOCK(p); - else - KERNEL_LOCK(); + KERNEL_LOCK(); rv = uvm_fault(map, trunc_page(va), 0, ftype); p->p_addr->u_pcb.pcb_onfault = onfault; @@ -372,10 +363,7 @@ fault_common: else if (rv == EACCES) rv = EFAULT; } - if (USERMODE(trapframe->sr)) - KERNEL_PROC_UNLOCK(p); - else - KERNEL_UNLOCK(); + KERNEL_UNLOCK(); if (rv == 0) { if (!USERMODE(trapframe->sr)) return; @@ -510,15 +498,15 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr } } #ifdef SYSCALL_DEBUG - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); scdebug_call(p, code, args.i); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); #endif #ifdef KTRACE if (KTRPOINT(p, KTR_SYSCALL)) { - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); ktrsyscall(p, code, callp->sy_argsize, args.i); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); } #endif rval[0] = 0; @@ -530,18 +518,18 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr #if NSYSTRACE > 0 if (ISSET(p->p_flag, P_SYSTRACE)) { - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); i = systrace_redirect(code, p, args.i, rval); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); } else #endif { int nolock = (callp->sy_flags & SY_NOLOCK); if (!nolock) - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); i = (*callp->sy_call)(p, &args, rval); if (!nolock) - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); } switch (i) { case 0: @@ -562,15 +550,15 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr locr0->a3 = 1; } #ifdef SYSCALL_DEBUG - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); scdebug_ret(p, code, i, rval); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); #endif #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) { - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); ktrsysret(p, code, i, rval[0]); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); } #endif goto out; @@ -816,9 +804,9 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr p->p_md.md_regs->cause = trapframe->cause; p->p_md.md_regs->badvaddr = trapframe->badvaddr; sv.sival_ptr = (void *)trapframe->badvaddr; - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); trapsignal(p, i, ucode, typ, sv); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); out: /* * Note: we should only get here if returning to user mode. @@ -838,18 +826,18 @@ child_return(arg) trapframe->v1 = 1; trapframe->a3 = 0; - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); userret(p); #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) { - KERNEL_PROC_LOCK(p); + KERNEL_LOCK(); ktrsysret(p, (p->p_flag & P_THREAD) ? SYS_rfork : (p->p_p->ps_flags & PS_PPWAIT) ? SYS_vfork : SYS_fork, 0, 0); - KERNEL_PROC_UNLOCK(p); + KERNEL_UNLOCK(); } #endif } |