RFC change to process.c
Denis J Barrow
DJ at de.ibm.com
Wed May 28 02:43:44 EST 2003
Hi,
ptregs is set to NULL for kernel threads in linuxppc64 & linuxppc on
2.5.66 this
is not done on non powerpc linux ports to my knowledge.
The pSeries kernel boots fine with the modification below.
It specifically prevents me from modifying the pt_regs on my kernel thread
& it
appears to be more a hindrance than a help & makes kernel threads harder to
debug,
unless somebody can give me a good reason why this is the way it is I
suggest
that the change below be accepted.
PS Martin/Uli it might be an idea to clear_ti_thread_flag(p->thread_info,
TIF_31BIT);
for zSeries kernel threads in copy_thread.
Index: process.c
===================================================================
RCS file: /home/cvs/linuxppc64_2_5/arch/ppc64/kernel/process.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 process.c
--- process.c 11 Apr 2003 10:59:52 -0000 1.1.1.1
+++ process.c 27 May 2003 16:35:27 -0000
@@ -200,14 +200,12 @@
if ((childregs->msr & MSR_PR) == 0) {
/* for kernel thread, set stackptr in new task */
childregs->gpr[1] = sp + sizeof(struct pt_regs);
- p->thread.regs = NULL; /* no user register state */
clear_ti_thread_flag(p->thread_info, TIF_32BIT);
#ifdef CONFIG_PPC_ISERIES
set_ti_thread_flag(p->thread_info, TIF_RUN_LIGHT);
#endif
} else {
childregs->gpr[1] = usp;
- p->thread.regs = childregs;
if (clone_flags & CLONE_SETTLS) {
if (test_thread_flag(TIF_32BIT))
childregs->gpr[2] = childregs->gpr[6];
@@ -215,6 +213,7 @@
childregs->gpr[13] = childregs->gpr[6];
}
}
+ p->thread.regs = childregs;
childregs->gpr[3] = 0; /* Result from fork() */
sp -= STACK_FRAME_OVERHEAD;
D.J. Barrow
Linux Kernel Developer
dj at de.ibm.com,barrow_dj at yahoo.com
Phone:0049-7031-16-2943
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list