diff options
-rw-r--r-- | sys/arch/amd64/amd64/trap.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/trap.c | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/trap.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/bi/if_ni.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/bi/kdb.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_lock.c | 5 | ||||
-rw-r--r-- | sys/sys/systm.h | 8 |
7 files changed, 17 insertions, 18 deletions
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 1ac2caf8cfd..257965668d9 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.12 2007/04/20 16:15:36 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.13 2007/05/11 10:06:55 pedro Exp $ */ /* $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $ */ /*- @@ -372,7 +372,7 @@ copyfault: goto we_re_toast; #endif cr2 = rcr2(); - KERNEL_LOCK(LK_CANRECURSE|LK_EXCLUSIVE); + KERNEL_LOCK(); goto faultcommon; case T_PAGEFLT|T_USER: { /* page fault */ diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 0bea0095d56..9cd0ecd30bf 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.82 2007/03/15 10:22:29 art Exp $ */ +/* $OpenBSD: trap.c,v 1.83 2007/05/11 10:06:55 pedro Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ /*- @@ -447,7 +447,7 @@ trap(struct trapframe frame) goto we_re_toast; #endif cr2 = rcr2(); - KERNEL_LOCK(LK_CANRECURSE|LK_EXCLUSIVE); + KERNEL_LOCK(); goto faultcommon; case T_PAGEFLT|T_USER: { /* page fault */ diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c index 4de452d5ebf..ff37a4ac9a0 100644 --- a/sys/arch/m88k/m88k/trap.c +++ b/sys/arch/m88k/m88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.39 2007/03/15 10:22:29 art Exp $ */ +/* $OpenBSD: trap.c,v 1.40 2007/05/11 10:06:55 pedro Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * Copyright (c) 1998 Steve Murphree, Jr. @@ -282,7 +282,7 @@ m88100_trap(unsigned type, struct trapframe *frame) panic("trap: bad kernel access at %x", fault_addr); } - KERNEL_LOCK(LK_CANRECURSE | LK_EXCLUSIVE); + KERNEL_LOCK(); vm = p->p_vmspace; map = kernel_map; @@ -738,7 +738,7 @@ m88110_trap(unsigned type, struct trapframe *frame) panic("trap: bad kernel access at %x", fault_addr); } - KERNEL_LOCK(LK_CANRECURSE | LK_EXCLUSIVE); + KERNEL_LOCK(); vm = p->p_vmspace; map = kernel_map; diff --git a/sys/arch/vax/bi/if_ni.c b/sys/arch/vax/bi/if_ni.c index 29760c45872..cdd803754e3 100644 --- a/sys/arch/vax/bi/if_ni.c +++ b/sys/arch/vax/bi/if_ni.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ni.c,v 1.9 2007/05/10 17:59:26 deraadt Exp $ */ +/* $OpenBSD: if_ni.c,v 1.10 2007/05/11 10:06:55 pedro Exp $ */ /* $NetBSD: if_ni.c,v 1.15 2002/05/22 16:03:14 wiz Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -596,7 +596,7 @@ niintr(void *arg) if ((NI_RREG(NI_PSR) & PSR_ERR)) printf("%s: PSR %x\n", sc->sc_dev.dv_xname, NI_RREG(NI_PSR)); - KERNEL_LOCK(LK_CANRECURSE|LK_EXCLUSIVE); + KERNEL_LOCK(); /* Got any response packets? */ while ((NI_RREG(NI_PSR) & PSR_RSQ) && (data = REMQHI(&gvp->nc_forwr))) { diff --git a/sys/arch/vax/bi/kdb.c b/sys/arch/vax/bi/kdb.c index 6fb2415a3c5..26130c2e13a 100644 --- a/sys/arch/vax/bi/kdb.c +++ b/sys/arch/vax/bi/kdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kdb.c,v 1.10 2007/05/10 17:59:26 deraadt Exp $ */ +/* $OpenBSD: kdb.c,v 1.11 2007/05/11 10:06:55 pedro Exp $ */ /* $NetBSD: kdb.c,v 1.26 2001/11/13 12:51:34 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -301,7 +301,7 @@ kdbintr(void *arg) kdbsaerror(&sc->sc_dev, 1); return; } - KERNEL_LOCK(LK_CANRECURSE|LK_EXCLUSIVE); + KERNEL_LOCK(); mscp_intr(sc->sc_softc); KERNEL_UNLOCK(); } diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 3fc779e71b7..350977aff2f 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lock.c,v 1.28 2007/05/08 20:25:56 deraadt Exp $ */ +/* $OpenBSD: kern_lock.c,v 1.29 2007/05/11 10:06:56 pedro Exp $ */ /* * Copyright (c) 1995 @@ -801,9 +801,8 @@ _kernel_lock_init(void) * and the lower half of the kernel. */ -/* XXX The flag should go, all callers want equal behaviour. */ void -_kernel_lock(int flag) +_kernel_lock(void) { SCHED_ASSERT_UNLOCKED(); __mp_lock(&kernel_lock); diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 164ed818ca6..a2a0da9aadb 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: systm.h,v 1.70 2006/10/26 13:18:24 jmc Exp $ */ +/* $OpenBSD: systm.h,v 1.71 2007/05/11 10:06:56 pedro Exp $ */ /* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */ /*- @@ -314,13 +314,13 @@ void user_config(void); #if defined(MULTIPROCESSOR) void _kernel_lock_init(void); -void _kernel_lock(int); +void _kernel_lock(void); void _kernel_unlock(void); void _kernel_proc_lock(struct proc *); void _kernel_proc_unlock(struct proc *); #define KERNEL_LOCK_INIT() _kernel_lock_init() -#define KERNEL_LOCK(flag) _kernel_lock((flag)) +#define KERNEL_LOCK() _kernel_lock() #define KERNEL_UNLOCK() _kernel_unlock() #define KERNEL_PROC_LOCK(p) _kernel_proc_lock((p)) #define KERNEL_PROC_UNLOCK(p) _kernel_proc_unlock((p)) @@ -328,7 +328,7 @@ void _kernel_proc_unlock(struct proc *); #else /* ! MULTIPROCESSOR */ #define KERNEL_LOCK_INIT() /* nothing */ -#define KERNEL_LOCK(flag) /* nothing */ +#define KERNEL_LOCK() /* nothing */ #define KERNEL_UNLOCK() /* nothing */ #define KERNEL_PROC_LOCK(p) /* nothing */ #define KERNEL_PROC_UNLOCK(p) /* nothing */ |