Changes for newlock2.
This commit is contained in:
parent
3a0eef4ed3
commit
c51fe0708a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ast.c,v 1.9 2007/02/09 21:55:02 ad Exp $ */
|
||||
/* $NetBSD: ast.c,v 1.10 2007/02/18 07:25:34 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994,1995 Mark Brinicombe
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.9 2007/02/09 21:55:02 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.10 2007/02/18 07:25:34 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -117,8 +117,8 @@ ast(struct trapframe *tf)
|
||||
|
||||
p = l->l_proc;
|
||||
|
||||
if (p->p_flag & P_OWEUPC) {
|
||||
p->p_flag &= ~P_OWEUPC;
|
||||
if (l->l_pflag & LP_OWEUPC) {
|
||||
l->l_pflag &= ~LP_OWEUPC;
|
||||
ADDUPROF(p);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_trap.c,v 1.5 2005/12/11 12:16:41 christos Exp $ */
|
||||
/* $NetBSD: linux_trap.c,v 1.6 2007/02/18 07:25:35 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.5 2005/12/11 12:16:41 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.6 2007/02/18 07:25:35 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_trap.c,v 1.5 2005/12/11 12:16:41 christos Exp
|
||||
#include <compat/linux/common/linux_exec.h>
|
||||
|
||||
void
|
||||
linux_trapsignal(struct lwp *l, const ksiginfo_t *ksi)
|
||||
linux_trapsignal(struct lwp *l, ksiginfo_t *ksi)
|
||||
{
|
||||
trapsignal(l, ksi);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: syscall.c,v 1.34 2006/07/19 21:11:40 ad Exp $ */
|
||||
/* $NetBSD: syscall.c,v 1.35 2007/02/18 07:25:35 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.34 2006/07/19 21:11:40 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.35 2007/02/18 07:25:35 matt Exp $");
|
||||
|
||||
#include <sys/device.h>
|
||||
#include <sys/errno.h>
|
||||
@ -141,14 +141,14 @@ swi_handler(trapframe_t *frame)
|
||||
ksi.ksi_signo = SIGILL;
|
||||
ksi.ksi_code = ILL_ILLOPC;
|
||||
ksi.ksi_addr = (u_int32_t *)(intptr_t) (frame->tf_pc-INSN_SIZE);
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
#if 0
|
||||
/* maybe one day we'll do emulations */
|
||||
(*l->l_proc->p_emul->e_trapsignal)(l, &ksi);
|
||||
#else
|
||||
trapsignal(l, &ksi);
|
||||
#endif
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
userret(l);
|
||||
return;
|
||||
}
|
||||
@ -230,7 +230,7 @@ syscall_plain(struct trapframe *frame, struct lwp *l, u_int32_t insn)
|
||||
register_t *ap, *args, copyargs[MAXARGS], rval[2];
|
||||
ksiginfo_t ksi;
|
||||
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
|
||||
switch (insn & SWI_OS_MASK) { /* Which OS is the SWI from? */
|
||||
case SWI_OS_ARM: /* ARM-defined SWIs */
|
||||
@ -362,7 +362,7 @@ syscall_plain(struct trapframe *frame, struct lwp *l, u_int32_t insn)
|
||||
break;
|
||||
}
|
||||
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
userret(l);
|
||||
}
|
||||
|
||||
@ -376,7 +376,7 @@ syscall_fancy(struct trapframe *frame, struct lwp *l, u_int32_t insn)
|
||||
register_t *ap, *args, copyargs[MAXARGS], rval[2];
|
||||
ksiginfo_t ksi;
|
||||
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
|
||||
switch (insn & SWI_OS_MASK) { /* Which OS is the SWI from? */
|
||||
case SWI_OS_ARM: /* ARM-defined SWIs */
|
||||
@ -512,7 +512,7 @@ out:
|
||||
}
|
||||
|
||||
trace_exit(l, code, args, rval, error);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
userret(l);
|
||||
}
|
||||
|
||||
@ -533,13 +533,13 @@ child_return(arg)
|
||||
frame->tf_r15 &= ~R15_FLAG_C; /* carry bit */
|
||||
#endif
|
||||
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
userret(l);
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_SYSRET)) {
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
ktrsysret(l, SYS_fork, 0, 0);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: undefined.c,v 1.28 2007/02/09 21:55:02 ad Exp $ */
|
||||
/* $NetBSD: undefined.c,v 1.29 2007/02/18 07:25:35 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Ben Harris.
|
||||
@ -54,7 +54,7 @@
|
||||
#include <sys/kgdb.h>
|
||||
#endif
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.28 2007/02/09 21:55:02 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.29 2007/02/18 07:25:35 matt Exp $");
|
||||
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/queue.h>
|
||||
@ -154,9 +154,9 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code)
|
||||
ksi.ksi_code = TRAP_BRKPT;
|
||||
ksi.ksi_addr = (u_int32_t *)addr;
|
||||
ksi.ksi_trap = 0;
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
trapsignal(l, &ksi);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
return 0;
|
||||
}
|
||||
#ifdef KGDB
|
||||
@ -262,9 +262,9 @@ undefinedinstruction(trapframe_t *frame)
|
||||
ksi.ksi_signo = SIGILL;
|
||||
ksi.ksi_code = ILL_ILLOPC;
|
||||
ksi.ksi_addr = (u_int32_t *)(intptr_t) fault_pc;
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
trapsignal(l, &ksi);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
userret(l);
|
||||
return;
|
||||
}
|
||||
@ -363,9 +363,9 @@ undefinedinstruction(trapframe_t *frame)
|
||||
ksi.ksi_code = ILL_ILLOPC;
|
||||
ksi.ksi_addr = (u_int32_t *)fault_pc;
|
||||
ksi.ksi_trap = fault_instruction;
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
trapsignal(l, &ksi);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
}
|
||||
|
||||
if ((fault_code & FAULT_USER) == 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fault.c,v 1.63 2007/02/09 21:55:02 ad Exp $ */
|
||||
/* $NetBSD: fault.c,v 1.64 2007/02/18 07:25:35 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2003 Wasabi Systems, Inc.
|
||||
@ -81,7 +81,7 @@
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.63 2007/02/09 21:55:02 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.64 2007/02/18 07:25:35 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -174,9 +174,9 @@ static inline void
|
||||
call_trapsignal(struct lwp *l, ksiginfo_t *ksi)
|
||||
{
|
||||
|
||||
KERNEL_PROC_LOCK(l);
|
||||
KERNEL_LOCK(1, l);
|
||||
TRAPSIGNAL(l, ksi);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
KERNEL_UNLOCK_LAST(l);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.35 2006/05/10 06:24:02 skrll Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.36 2007/02/18 07:25:35 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.35 2006/05/10 06:24:02 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.36 2007/02/18 07:25:35 matt Exp $");
|
||||
|
||||
#include "opt_armfpe.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
@ -251,6 +251,11 @@ cpu_lwp_free(struct lwp *l, int proc)
|
||||
#endif /* STACKCHECKS */
|
||||
}
|
||||
|
||||
void
|
||||
cpu_lwp_free2(struct lwp *l)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
cpu_exit(struct lwp *l)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.41 2007/02/16 02:53:44 ad Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.42 2007/02/18 07:25:35 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1996 Mark Brinicombe.
|
||||
@ -213,6 +213,8 @@ struct cpu_info {
|
||||
u_int32_t ci_arm_cpurev; /* CPU revision */
|
||||
u_int32_t ci_ctrl; /* The CPU control register */
|
||||
struct evcnt ci_arm700bugcount;
|
||||
int32_t ci_mtx_count;
|
||||
int ci_mtx_oldspl;
|
||||
#ifdef MULTIPROCESSOR
|
||||
MP_CPU_INFO_MEMBERS
|
||||
#endif
|
||||
@ -242,21 +244,21 @@ extern int astpending;
|
||||
* process as soon as possible.
|
||||
*/
|
||||
|
||||
#define signotify(p) setsoftast()
|
||||
#define cpu_signotify(l) setsoftast()
|
||||
|
||||
/*
|
||||
* Preempt the current process if in interrupt from user mode,
|
||||
* or after the current trap/syscall if in system mode.
|
||||
*/
|
||||
extern int want_resched; /* resched() was called */
|
||||
#define need_resched(ci) (want_resched = 1, setsoftast())
|
||||
#define cpu_need_resched(ci) (want_resched = 1, setsoftast())
|
||||
|
||||
/*
|
||||
* Give a profiling tick to the current process when the user profiling
|
||||
* buffer pages are invalid. On the i386, request an ast to send us
|
||||
* through trap(), marking the proc as needing a profiling tick.
|
||||
*/
|
||||
#define need_proftick(p) ((p)->p_flag |= P_OWEUPC, setsoftast())
|
||||
#define cpu_need_proftick(l) ((l)->l_pflag |= LP_OWEUPC, setsoftast())
|
||||
|
||||
#ifndef acorn26
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user