From owner-p4-projects@FreeBSD.ORG Mon Jun 5 03:30:04 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B3F9D16A5B1; Mon, 5 Jun 2006 03:30:04 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8AB8716A523 for ; Mon, 5 Jun 2006 03:30:04 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3CF243D58 for ; Mon, 5 Jun 2006 03:29:59 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k553SHn1006040 for ; Mon, 5 Jun 2006 03:28:17 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k553SHhn006037 for perforce@freebsd.org; Mon, 5 Jun 2006 03:28:17 GMT (envelope-from peter@freebsd.org) Date: Mon, 5 Jun 2006 03:28:17 GMT Message-Id: <200606050328.k553SHhn006037@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 98518 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2006 03:30:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=98518 Change 98518 by peter@peter_daintree on 2006/06/05 03:27:52 Clean up some stray loose ends. Affected files ... .. //depot/projects/bike_sched/sys/amd64/amd64/vm_machdep.c#3 edit .. //depot/projects/bike_sched/sys/arm/arm/trap.c#3 edit .. //depot/projects/bike_sched/sys/arm/arm/vm_machdep.c#2 edit .. //depot/projects/bike_sched/sys/i386/i386/vm_machdep.c#2 edit .. //depot/projects/bike_sched/sys/ia64/ia64/trap.c#2 edit .. //depot/projects/bike_sched/sys/kern/kern_thread.c#3 edit .. //depot/projects/bike_sched/sys/powerpc/powerpc/trap.c#2 edit .. //depot/projects/bike_sched/sys/sparc64/sparc64/trap.c#2 edit .. //depot/projects/bike_sched/sys/sys/proc.h#3 edit Differences ... ==== //depot/projects/bike_sched/sys/amd64/amd64/vm_machdep.c#3 (text+ko) ==== @@ -244,8 +244,7 @@ * Initialize machine state (pcb and trap frame) for a new thread about to * upcall. Put enough state in the new thread's PCB to get it to go back * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Address and stack, along with those from upcals that are from other sources. */ void cpu_set_upcall(struct thread *td, struct thread *td0) @@ -302,9 +301,8 @@ } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Modify the machine state created by cpu_set_upcall() to arrange + * for the new thread to make a specific call as its first act. */ void cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, ==== //depot/projects/bike_sched/sys/arm/arm/trap.c#3 (text+ko) ==== @@ -729,8 +729,6 @@ td->td_frame = tf; if (td->td_ucred != td->td_proc->p_ucred) cred_update_thread(td); - if (td->td_proc->p_flag & P_SA) - thread_user_enter(td); } fault_pc = tf->tf_pc; if (td->td_md.md_spinlock_count == 0) { @@ -1002,8 +1000,6 @@ td->td_frame = frame; td->td_pticks = 0; - if (td->td_proc->p_flag & P_SA) - thread_user_enter(td); /* * Make sure the program counter is correctly aligned so we * don't take an alignment fault trying to read the opcode. ==== //depot/projects/bike_sched/sys/arm/arm/vm_machdep.c#2 (text+ko) ==== @@ -256,8 +256,7 @@ * Initialize machine state (pcb and trap frame) for a new thread about to * upcall. Put enough state in the new thread's PCB to get it to go back * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Address and stack, along with those from upcals that are from other sources. */ void cpu_set_upcall(struct thread *td, struct thread *td0) @@ -283,9 +282,8 @@ } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Modify the machine state created by cpu_set_upcall() to arrange + * for the new thread to make a specific call as its first act. */ void cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, ==== //depot/projects/bike_sched/sys/i386/i386/vm_machdep.c#2 (text+ko) ==== @@ -370,8 +370,7 @@ * Initialize machine state (pcb and trap frame) for a new thread about to * upcall. Put enough state in the new thread's PCB to get it to go back * userret(), where we can intercept it again to set the return (upcall) - * Address and stack, along with those from upcals that are from other sources - * such as those generated in thread_userret() itself. + * Address and stack, along with those from upcals that are from other sources. */ void cpu_set_upcall(struct thread *td, struct thread *td0) @@ -439,9 +438,8 @@ } /* - * Set that machine state for performing an upcall that has to - * be done in thread_userret() so that those upcalls generated - * in thread_userret() itself can be done as well. + * Modify the machine state created by cpu_set_upcall() to arrange + * for the new thread to make a specific call as its first act. */ void cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, ==== //depot/projects/bike_sched/sys/ia64/ia64/trap.c#2 (text+ko) ==== @@ -955,8 +955,6 @@ td->td_pticks = 0; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - if (p->p_flag & P_SA) - thread_user_enter(td); if (p->p_sysent->sv_prepsyscall) { /* (*p->p_sysent->sv_prepsyscall)(tf, args, &code, ¶ms); */ ==== //depot/projects/bike_sched/sys/kern/kern_thread.c#3 (text+ko) ==== @@ -314,7 +314,6 @@ * exit1() * kse_exit() * thr_exit() - * thread_user_enter() * thread_suspend_check() */ void @@ -392,7 +391,6 @@ * exit1() - clears threading flags before coming here * kse_exit() - treats last thread specially * thr_exit() - treats last thread specially - * thread_user_enter() - only if more exist * thread_suspend_check() - only if more exist */ panic ("thread_exit: Last thread exiting on its own"); ==== //depot/projects/bike_sched/sys/powerpc/powerpc/trap.c#2 (text+ko) ==== @@ -348,9 +348,6 @@ PCPU_LAZY_INC(cnt.v_syscall); - if (p->p_flag & P_SA) - thread_user_enter(td); - code = frame->fixreg[0]; params = (caddr_t)(frame->fixreg + FIRSTARG); n = NARGREG; ==== //depot/projects/bike_sched/sys/sparc64/sparc64/trap.c#2 (text+ko) ==== @@ -529,8 +529,6 @@ td->td_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - if (p->p_flag & P_SA) - thread_user_enter(td); code = tf->tf_global[1]; /* ==== //depot/projects/bike_sched/sys/sys/proc.h#3 (text+ko) ==== @@ -805,8 +805,6 @@ void thread_unsuspend(struct proc *p); void thread_unsuspend_one(struct thread *td); void thread_unthread(struct thread *td); -int thread_userret(struct thread *td, struct trapframe *frame); -void thread_user_enter(struct thread *td); void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); void thr_exit1(void);