From owner-p4-projects Wed Apr 10 4:52:44 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E747137B405; Wed, 10 Apr 2002 04:52:35 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 33A6F37B404 for ; Wed, 10 Apr 2002 04:52:35 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3ABqYV54915 for perforce@freebsd.org; Wed, 10 Apr 2002 04:52:34 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Wed, 10 Apr 2002 04:52:34 -0700 (PDT) Message-Id: <200204101152.g3ABqYV54915@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 9504 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9504 Change 9504 by peter@peter_thunder on 2002/04/10 04:51:36 Use dfr's fix instead of my hack. I expect he'll commit this to freefall soon. :-) Affected files ... ... //depot/projects/ia64/sys/ia64/ia64/exception.s#10 edit ... //depot/projects/ia64/sys/ia64/ia64/trap.c#19 edit Differences ... ==== //depot/projects/ia64/sys/ia64/ia64/exception.s#10 (text+ko) ==== @@ -1406,8 +1406,49 @@ mov out1=r16 // arguments add out2=(8*8),r16 // trapframe pointer br.call.sptk.many rp=syscall // do the work +} { .mmi +3: rsm psr.i // we know that psr.i == 1 + add r14=PC_CURTHREAD,r13 // &curthread + nop.i 0 + ;; +} { .mmi + ld8 r14=[r14] // curthread + ;; + add r14=TD_KSE,r14 // &curthread->td_kse + nop.i 0 + ;; +} { .mmi + ld8 r14=[r14] // curkse + ;; + add r14=KE_FLAGS,r14 // &curkse->ke_flags + nop.i 0 + ;; +} { .mmi + ld4 r14=[r14] // curkse->ke_flags + ;; + nop.m 0 + tbit.nz p6,p7=r14,10 // KEF_ASTPENDING + ;; +} { .mib + nop.m 0 +(p7) tbit.nz.or.andcm p6,p7=r14,11 // KEF_NEEDRESCHED +(p7) br.cond.dptk 2f + ;; +} { .mmi + ssm psr.i // restore interrupts + ;; + srlz.d + mov out0=loc0 // trapframe argument to ast() +} { .mib + nop.m 0 + nop.i 0 + br.call.sptk.many rp=ast +} { .mib + nop.m 0 + nop.i 0 + br 3b } { .mii - ld8 r14=[loc0] // check tf_flags +2: ld8 r14=[loc0] // check tf_flags dep r15=0,loc0,61,3 // physical address of trapframe ;; tbit.z p6,p0=r14,0 // check FRAME_SYSCALL bit ==== //depot/projects/ia64/sys/ia64/ia64/trap.c#19 (text+ko) ==== @@ -860,36 +860,6 @@ */ STOPEVENT(p, S_SCX, code); - /* - * Deal with the fact that we do not call ast() if we are - * just returning from a syscall frame. Sigh. - */ - if (framep->tf_flags & FRAME_SYSCALL) { - int sig; - mtx_lock(&Giant); - PROC_LOCK(p); - while ((sig = CURSIG(p)) != 0) - postsig(sig); - PROC_UNLOCK(p); - mtx_unlock(&Giant); - - mtx_lock_spin(&sched_lock); - td->td_priority = td->td_ksegrp->kg_user_pri; - if (td->td_kse->ke_flags & KEF_NEEDRESCHED) { - setrunqueue(td); - p->p_stats->p_ru.ru_nivcsw++; - mi_switch(); - mtx_unlock_spin(&sched_lock); - mtx_lock(&Giant); - PROC_LOCK(p); - while ((sig = CURSIG(p)) != 0) - postsig(sig); - PROC_UNLOCK(p); - mtx_unlock(&Giant); - } else - mtx_unlock_spin(&sched_lock); - } - #ifdef DIAGNOSTIC cred_free_thread(td); #endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message