PERFORCE change 102831 for review

Kip Macy kmacy at FreeBSD.org
Mon Jul 31 07:13:31 UTC 2006


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

Change 102831 by kmacy at kmacy_storage:sun4v_work_stable on 2006/07/31 07:12:48

	md fixes for IFC

Affected files ...

.. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/db_trace.c#2 edit
.. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/trap.c#5 edit

Differences ...

==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/db_trace.c#2 (text+ko) ====

@@ -97,7 +97,7 @@
  * User stack trace (debugging aid).
  */
 static void
-db_utrace(struct thread *td, struct trapframe *tf, int count, int *quitp)
+db_utrace(struct thread *td, struct trapframe *tf, int count)
 {
 	struct pcb *pcb;
 	db_addr_t sp, rsp, o7, pc;
@@ -109,7 +109,7 @@
 	    FALSE);
 	pc = db_get_value((db_addr_t)&tf->tf_tpc, sizeof(tf->tf_tpc), FALSE);
 	db_printf("user trace: trap %%o7=%#lx\n", o7);
-	while (count-- && sp != 0 && !*quitp) {
+	while (count-- && sp != 0 && !db_pager_quit) {
 		db_printf("pc %#lx, sp %#lx\n", pc, sp);
 		/* First, check whether the frame is in the pcb. */
 		found = 0;
@@ -135,7 +135,7 @@
 }
 
 static int
-db_print_trap(struct thread *td, struct trapframe *tf, int count, int *quitp)
+db_print_trap(struct thread *td, struct trapframe *tf, int count)
 {
 	struct proc *p;
 	const char *symname;
@@ -226,7 +226,7 @@
 		db_printf("userland() at ");
 		db_printsym(tpc, DB_STGY_PROC);
 		db_printf("\n");
-		db_utrace(td, tf, count, quitp);
+		db_utrace(td, tf, count);
 	}
 	return (user);
 }
@@ -252,8 +252,7 @@
 	user = 0;
 	npc = 0;
 	quit = 0;
-	db_setup_paging(db_simple_pager, &quit, db_lines_per_page);
-	while (count-- && !user && !quit) {
+	while (count-- && !user && !db_pager_quit) {
 		pc = (db_addr_t)db_get_value((db_addr_t)&fp->fr_pc,
 		    sizeof(fp->fr_pc), FALSE);
 		if (trap) {
@@ -277,7 +276,7 @@
 			tf = (struct trapframe *)(fp + 1);
 			npc = db_get_value((db_addr_t)&tf->tf_tpc,
 			    sizeof(tf->tf_tpc), FALSE);
-			user = db_print_trap(td, tf, count, &quit);
+			user = db_print_trap(td, tf, count);
 			trap = 1;
 		} else {
 			db_printf("%s() at ", name);

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

@@ -603,7 +603,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];
@@ -625,9 +625,6 @@
 	 * 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);
@@ -682,13 +679,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