Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2002 04:52:34 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 9504 for review
Message-ID:  <200204101152.g3ABqYV54915@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204101152.g3ABqYV54915>