Re: [PATCH v4] [POWERPC] Move to runtime allocated exception stacks

2008-05-31 Thread Kumar Gala


On May 31, 2008, at 12:04 AM, Paul Mackerras wrote:


Kumar Gala writes:

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.


Looks fine, with just one very minor comment:


-   addir11,r11,THREAD_SIZE; \
-1:	subi	r11,r11,INT_FRAME_SIZE;	/* Allocate an exception frame  
*/\

+1: addir11,r11,THREAD_SIZE; \
+   subir11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\


You could make that a single addi r11,r11,THREAD_SIZE-INT_FRAME_SIZE
now.


I remember noticing that and thinking I should go back in fix.  Will  
look at doing that and add the patches to my powerpc-next tree.


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v4] [POWERPC] Move to runtime allocated exception stacks

2008-05-30 Thread Paul Mackerras
Kumar Gala writes:

 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.

Looks fine, with just one very minor comment:

 - addir11,r11,THREAD_SIZE; \
 -1:   subir11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\
 +1:   addir11,r11,THREAD_SIZE; \
 + subir11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\

You could make that a single addi r11,r11,THREAD_SIZE-INT_FRAME_SIZE
now.

Paul.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v4] [POWERPC] Move to runtime allocated exception stacks

2008-05-29 Thread Josh Boyer
On Tue, 20 May 2008 00:02:45 -0500
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]
 ---
 
 Fixed 40x handling based on Josh's feedback and help.

I tested this series on 44x and 40x today.  Both boot up and function
normally.  GDB is able to set breakpoints, single step, and operate as
well as it normally does.

Again, no hard stress testing but it does appear to work.

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev