Message ID | 1349776521.2615.54.camel@dabdike.int.hansenpartnership.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Tue, Oct 09, 2012 at 10:55:21AM +0100, James Bottomley wrote: > On Mon, 2012-10-08 at 12:28 +0100, James Bottomley wrote: > > Even with the patch applied, it's hanging on boot around the first > > kthread spawns. I'm investigating. > > Actually an obvious fix: you can't set up ksp and then zero the > registers. > > I note that the stack frame you're creating is too big since > THREAD_SZ_ALGN includes space for a stack frame by design so adding > another one is redundant. However, this confusion seems to permeate the > syscall code as well, so perhaps fixing it up later is better. > > With this patch applied, I can now boot up successfully to a login > prompt. Thanks. Folded and pushed with the rebase - it's in experimental-kernel_thread pushed right now. Should propagate to git.kernel.org shortly... -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 61113c3..38db36f 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -254,8 +254,6 @@ copy_thread(unsigned long clone_flags, unsigned long usp, #ifdef CONFIG_HPUX extern void * const hpux_child_return; #endif - cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE; - if (unlikely(p->flags & PF_KTHREAD)) { memset(cregs, 0, sizeof(struct pt_regs)); if (!usp) /* idle thread */ @@ -265,6 +263,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, /* Must exit via ret_from_kernel_thread in order * to call schedule_tail() */ + cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE; cregs->kpc = (unsigned long) &ret_from_kernel_thread; /* * Copy function and argument to be called from @@ -280,6 +279,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, } else { /* user thread */ cregs->gr[30] = usp; + cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE; if (personality(p->personality) == PER_HPUX) { #ifdef CONFIG_HPUX cregs->kpc = (unsigned long) &hpux_child_return;