patch-2.4.21 linux-2.4.21/arch/s390x/kernel/process.c

Next file: linux-2.4.21/arch/s390x/kernel/s390_ksyms.c
Previous file: linux-2.4.21/arch/s390x/kernel/head.S
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/s390x/kernel/process.c linux-2.4.21/arch/s390x/kernel/process.c
@@ -102,7 +102,7 @@
 		show_trace((unsigned long *) regs->gprs[15]);
 }
 
-int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
+int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 {
         int clone_arg = flags | CLONE_VM;
         int retval;
@@ -178,6 +178,8 @@
         /* save fprs, if used in last task */
 	save_fp_regs(&p->thread.fp_regs);
         p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _REGION_TABLE;
+	/* start new process with ar4 pointing to the correct address space */
+	p->thread.ar4 = get_fs().ar4;
         /* Don't copy debug registers */
         memset(&p->thread.per_info,0,sizeof(p->thread.per_info));
         return 0;

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