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. James --- 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; -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html