patch-2.3.35 linux/arch/sparc/kernel/process.c

Next file: linux/arch/sparc/kernel/setup.c
Previous file: linux/arch/sparc/kernel/pcic.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.34/linux/arch/sparc/kernel/process.c linux/arch/sparc/kernel/process.c
@@ -1,4 +1,4 @@
-/*  $Id: process.c,v 1.139 1999/08/14 03:51:14 anton Exp $
+/*  $Id: process.c,v 1.141 1999/10/24 06:25:02 anton Exp $
  *  linux/arch/sparc/kernel/process.c
  *
  *  Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -55,7 +55,6 @@
 {
 	int ret = -EPERM;
 
-	lock_kernel();
 	if (current->pid != 0)
 		goto out;
 
@@ -100,7 +99,6 @@
 	}
 	ret = 0;
 out:
-	unlock_kernel();
 	return ret;
 }
 
@@ -188,9 +186,7 @@
 	       rw->ins[4], rw->ins[5], rw->ins[6], rw->ins[7]);
 }
 
-#ifdef __SMP__
 static spinlock_t sparc_backtrace_lock = SPIN_LOCK_UNLOCKED;
-#endif
 
 void __show_backtrace(unsigned long fp)
 {
@@ -702,37 +698,3 @@
 			   "g1", "g2", "g3", "o0", "o1", "memory", "cc");
 	return retval;
 }
-
-/*
- * These bracket the sleeping functions..
- */
-extern void scheduling_functions_start_here(void);
-extern void scheduling_functions_end_here(void);
-#define first_sched	((unsigned long) scheduling_functions_start_here)
-#define last_sched	((unsigned long) scheduling_functions_end_here)
-
-unsigned long get_wchan(struct task_struct *p)
-{
-	unsigned long pc, fp, bias = 0;
-	unsigned long task_base = (unsigned long) p;
-	struct reg_window *rw;
-	int count = 0;
-	if (!p || p == current || p->state == TASK_RUNNING)
-		return 0;
-
-	fp = p->thread.ksp + bias;
-	do {
-		/* Bogus frame pointer? */
-		if (fp < (task_base + sizeof(struct task_struct)) ||
-		    fp >= (task_base + (2 * PAGE_SIZE)))
-			break;
-		rw = (struct reg_window *) fp;
-		pc = rw->ins[7];
-		if (pc < first_sched || pc >= last_sched)
-			return pc;
-		fp = rw->ins[6] + bias;
-	} while (++count < 16);
-	return 0;
-}
-#undef last_sched
-#undef first_sched

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)