summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-06-29 19:51:37 +0000
committerjhb <jhb@FreeBSD.org>2001-06-29 19:51:37 +0000
commitcbc88996c619bc138b998f7e31c069ea60dcdefc (patch)
tree6a6509e044c3122df2e8a743db5230863c091dd8 /sys/ia64
parent8d232144a3e4758c8a4a8500238cb227ce7500ac (diff)
downloadFreeBSD-src-cbc88996c619bc138b998f7e31c069ea60dcdefc.zip
FreeBSD-src-cbc88996c619bc138b998f7e31c069ea60dcdefc.tar.gz
Move ast() and userret() to sys/kern/subr_trap.c now that they are MI.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/trap.c112
-rw-r--r--sys/ia64/include/cpu.h1
2 files changed, 0 insertions, 113 deletions
diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c
index 416b3cd..5422a2f 100644
--- a/sys/ia64/ia64/trap.c
+++ b/sys/ia64/ia64/trap.c
@@ -75,56 +75,6 @@ static int unaligned_fixup(struct trapframe *framep, struct proc *p);
extern char *syscallnames[];
#endif
-/*
- * Define the code needed before returning to user mode, for
- * trap and syscall.
- */
-void
-userret(register struct proc *p, struct trapframe *frame, u_quad_t oticks)
-{
- int sig;
-
- /* take pending signals */
- PROC_LOCK(p);
- while ((sig = CURSIG(p)) != 0)
- postsig(sig);
-
- mtx_lock_spin(&sched_lock);
- PROC_UNLOCK_NOSWITCH(p);
- p->p_pri.pri_level = p->p_pri.pri_user;
- if (resched_wanted(p)) {
- /*
- * Since we are curproc, a clock interrupt could
- * change our priority without changing run queues
- * (the running process is not kept on a run queue).
- * If this happened after we setrunqueue ourselves but
- * before we switch()'ed, we might not be on the queue
- * indicated by our priority.
- */
- DROP_GIANT_NOSWITCH();
- setrunqueue(p);
- p->p_stats->p_ru.ru_nivcsw++;
- mi_switch();
- mtx_unlock_spin(&sched_lock);
- PICKUP_GIANT();
- PROC_LOCK(p);
- while ((sig = CURSIG(p)) != 0)
- postsig(sig);
- mtx_lock_spin(&sched_lock);
- PROC_UNLOCK_NOSWITCH(p);
- }
-
- /*
- * If profiling, charge recent system time to the trapped pc.
- */
- if (p->p_sflag & PS_PROFIL) {
- mtx_unlock_spin(&sched_lock);
- addupc_task(p, TRAPF_PC(frame),
- (int)(p->p_sticks - oticks) * psratio);
- } else
- mtx_unlock_spin(&sched_lock);
-}
-
static const char *ia64_vector_names[] = {
"VHPT Translation", /* 0 */
"Instruction TLB", /* 1 */
@@ -608,68 +558,6 @@ syscall(int code, u_int64_t *args, struct trapframe *framep)
mtx_assert(&Giant, MA_NOTOWNED);
}
-/*
- * Process an asynchronous software trap.
- * This is relatively easy.
- */
-void
-ast(framep)
- struct trapframe *framep;
-{
- register struct proc *p;
- u_quad_t sticks;
-
- p = curproc;
-
- KASSERT(TRAPF_USERMODE(framep), ("ast in kernel mode"));
-
- /*
- * We check for a pending AST here rather than in assembly as
- * acquiring and release mutexes in assembly is not fun.
- */
- mtx_lock_spin(&sched_lock);
- if (!(astpending(p) || resched_wanted(p))) {
- mtx_unlock_spin(&sched_lock);
- return;
- }
-
- sticks = p->p_sticks;
- p->p_frame = framep;
-
- astoff(p);
- cnt.v_soft++;
- mtx_intr_enable(&sched_lock);
- if (p->p_sflag & PS_OWEUPC) {
- p->p_sflag &= ~PS_OWEUPC;
- mtx_unlock_spin(&sched_lock);
- mtx_lock(&Giant);
- addupc_task(p, p->p_stats->p_prof.pr_addr,
- p->p_stats->p_prof.pr_ticks);
- mtx_lock_spin(&sched_lock);
- }
- if (p->p_sflag & PS_ALRMPEND) {
- p->p_sflag &= ~PS_ALRMPEND;
- mtx_unlock_spin(&sched_lock);
- PROC_LOCK(p);
- psignal(p, SIGVTALRM);
- PROC_UNLOCK(p);
- mtx_lock_spin(&sched_lock);
- }
- if (p->p_sflag & PS_PROFPEND) {
- p->p_sflag &= ~PS_PROFPEND;
- mtx_unlock_spin(&sched_lock);
- PROC_LOCK(p);
- psignal(p, SIGPROF);
- PROC_UNLOCK(p);
- } else
- mtx_unlock_spin(&sched_lock);
-
- userret(p, framep, sticks);
-
- if (mtx_owned(&Giant))
- mtx_unlock(&Giant);
-}
-
extern int ia64_unaligned_print, ia64_unaligned_fix;
extern int ia64_unaligned_sigbus;
diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h
index 39872e5..d8518c4 100644
--- a/sys/ia64/include/cpu.h
+++ b/sys/ia64/include/cpu.h
@@ -120,7 +120,6 @@ struct trapframe;
extern struct rpb *hwrpb;
extern volatile int mc_expected, mc_received;
-void ast __P((struct trapframe *));
int badaddr __P((void *, size_t));
int badaddr_read __P((void *, size_t, void *));
void child_return __P((struct proc *p));
OpenPOWER on IntegriCloud