On Fri, 16 May 2008 14:04:54 -0500 (CDT) Kumar Gala <[EMAIL PROTECTED]> wrote:
> For the additonal exception levels (critical, debug, machine check) on > 40x/book-e we were using "static" allocations of the stack in the > associated head.S. > > Move to a runtime allocation to make the code a bit easier to read as > we mimic how we handle IRQ stacks. Its also a bit easier to setup the > stack with a "dummy" thread_info in C code. > > Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> > --- > arch/powerpc/kernel/head_40x.S | 14 ++------------ > arch/powerpc/kernel/head_44x.S | 9 --------- > arch/powerpc/kernel/head_booke.h | 29 +++++++++++------------------ > arch/powerpc/kernel/head_fsl_booke.S | 9 --------- > arch/powerpc/kernel/irq.c | 33 +++++++++++++++++++++++++++++++++ > arch/powerpc/kernel/setup_32.c | 24 ++++++++++++++++++++++++ > include/asm-powerpc/irq.h | 13 +++++++++++++ > 7 files changed, 83 insertions(+), 48 deletions(-) > > diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S > index 8552e67..ca75eaf 100644 > --- a/arch/powerpc/kernel/head_40x.S > +++ b/arch/powerpc/kernel/head_40x.S > @@ -148,8 +148,8 @@ _ENTRY(crit_r11) > mfcr r10; /* save CR in r10 for now */\ > mfspr r11,SPRN_SRR3; /* check whether user or kernel */\ > andi. r11,r11,MSR_PR; \ > - lis r11,[EMAIL PROTECTED]; \ > - ori r11,r11,[EMAIL PROTECTED]; \ > + lis r11,[EMAIL PROTECTED]; \ You need a: tophys(r11,r11); \ here. That fixes the hangs I see on my Walnut (PPC405GP) board when using gdb. The problem is that we're in real mode at this point, but using the virtual address of critirq_ctx. That seems to be a bad idea when trying to load values out of it... ;) > + lwz r11,[EMAIL PROTECTED](r11); > \ > beq 1f; \ > /* COMING FROM USER MODE */ \ > mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ josh _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev