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

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

diff -u --recursive --new-file v2.1.50/linux/arch/sparc/kernel/process.c linux/arch/sparc/kernel/process.c
@@ -105,6 +105,8 @@
 /* This is being executed in task 0 'user space'. */
 int cpu_idle(void *unused)
 {
+	extern volatile int smp_commenced;
+
 	current->priority = -100;
 	while(1) {
 		/*
@@ -118,7 +120,8 @@
 		}
 		/* endless idle loop with no priority at all */
 		current->counter = -100;
-		schedule();
+		if(!smp_commenced || resched_needed())
+			schedule();
 	}
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov