patch-2.4.9 linux/arch/arm/kernel/process.c

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

diff -u --recursive --new-file v2.4.8/linux/arch/arm/kernel/process.c linux/arch/arm/kernel/process.c
@@ -21,6 +21,7 @@
 #include <linux/user.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
 
 #include <asm/system.h>
@@ -39,8 +40,6 @@
 extern const char *processor_modes[];
 extern void setup_mm_for_reboot(char mode);
 
-asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call");
-
 static volatile int hlt_counter;
 
 #include <asm/arch/system.h>
@@ -125,7 +124,7 @@
 		pm_power_off();
 }
 
-void machine_restart(char * __unused)
+void machine_restart(void * __unused)
 {
 	/*
 	 * Clean and disable cache, and turn off interrupts
@@ -296,6 +295,8 @@
 {
 }
 
+asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
+
 int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
 	unsigned long unused,
 	struct task_struct * p, struct pt_regs * regs)
@@ -311,7 +312,9 @@
 	childregs->ARM_sp = esp;
 
 	save = ((struct context_save_struct *)(childregs)) - 1;
-	init_thread_css(save);
+	*save = INIT_CSS;
+	save->pc |= (unsigned long)ret_from_fork;
+
 	p->thread.save = save;
 
 	return 0;

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