PERFORCE change 103135 for review

John Birrell jb at FreeBSD.org
Thu Aug 3 20:41:17 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=103135

Change 103135 by jb at jb_freebsd2 on 2006/08/03 20:40:32

	Catch up on the MPSAFE changes to -current.
	
	Another reason for merging sun4v into current.

Affected files ...

.. //depot/projects/dtrace/src/sys/sun4v/sun4v/trap.c#6 edit

Differences ...

==== //depot/projects/dtrace/src/sys/sun4v/sun4v/trap.c#6 (text+ko) ====

@@ -629,7 +629,7 @@
   	else
  		callp = &p->p_sysent->sv_table[code];
 
-	narg = callp->sy_narg & SYF_ARGMASK;
+	narg = callp->sy_narg;
 
 	if (narg <= regcnt) {
 		argp = &tf->tf_out[reg];
@@ -647,13 +647,6 @@
 	CTR5(KTR_SYSC, "syscall: td=%p %s(%#lx, %#lx, %#lx)", td,
 	    syscallnames[code], argp[0], argp[1], argp[2]);
 
-	/*
-	 * Try to run the syscall without the MP lock if the syscall
-	 * is MP safe.
-	 */
-	if ((callp->sy_narg & SYF_MPSAFE) == 0)
-		mtx_lock(&Giant);
-
 #ifdef KTRACE
 	if (KTRPOINT(td, KTR_SYSCALL))
 		ktrsyscall(code, narg, argp);
@@ -733,13 +726,6 @@
 	}
 
 	/*
-	 * Release Giant if we had to get it.  Don't use mtx_owned(),
-	 * we want to catch broken syscalls.
-	 */
-	if ((callp->sy_narg & SYF_MPSAFE) == 0)
-		mtx_unlock(&Giant);
-
-	/*
 	 * Handle reschedule and other end-of-syscall issues
 	 */
 	userret(td, tf);


More information about the p4-projects mailing list