patch-1.3.26 linux/arch/i386/kernel/process.c

Next file: linux/arch/i386/kernel/signal.c
Previous file: linux/arch/i386/config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.25/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
@@ -44,17 +44,9 @@
  */
 asmlinkage int sys_idle(void)
 {
-	int i;
-	pmd_t * pmd;
-
 	if (current->pid != 0)
 		return -EPERM;
 
-	/* Map out the low memory: it's no longer needed */
-	pmd = pmd_offset(swapper_pg_dir, 0);
-	for (i = 0 ; i < 768 ; i++)
-		pmd_clear(pmd++);
-
 	/* endless idle loop with no priority at all */
 	current->counter = -100;
 	for (;;) {
@@ -120,6 +112,9 @@
  */
 void exit_thread(void)
 {
+	/* forget lazy i387 state */
+	if (last_task_used_math == current)
+		last_task_used_math = NULL;
 	/* forget local segments */
 	__asm__ __volatile__("mov %w0,%%fs ; mov %w0,%%gs ; lldt %w0"
 		: /* no outputs */
@@ -255,8 +250,8 @@
 	unsigned long clone_flags;
 	unsigned long newsp;
 
-	newsp = regs.ebx;
-	clone_flags = regs.ecx;
+	clone_flags = regs.ebx;
+	newsp = regs.ecx;
 	if (!newsp)
 		newsp = regs.esp;
 	return do_fork(clone_flags, newsp, &regs);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this