aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_40x.S
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-04-30 04:49:55 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-06-02 15:54:42 -0400
commitbcf0b0880710409420a4e3b15dbf4b9a63542c0b (patch)
treeca1c813648ea075b772112237fde3ccfe3ddb776 /arch/powerpc/kernel/head_40x.S
parentc054065bc10a7ee2bcf78b5bc95f4b4d9bdc923a (diff)
[POWERPC] Move to runtime allocated exception stacks
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 <galak@kernel.crashing.org> Acked-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head_40x.S')
-rw-r--r--arch/powerpc/kernel/head_40x.S18
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S
index 8552e67e3a8b..f2cf60d38f78 100644
--- a/arch/powerpc/kernel/head_40x.S
+++ b/arch/powerpc/kernel/head_40x.S
@@ -148,14 +148,14 @@ _ENTRY(crit_r11)
148 mfcr r10; /* save CR in r10 for now */\ 148 mfcr r10; /* save CR in r10 for now */\
149 mfspr r11,SPRN_SRR3; /* check whether user or kernel */\ 149 mfspr r11,SPRN_SRR3; /* check whether user or kernel */\
150 andi. r11,r11,MSR_PR; \ 150 andi. r11,r11,MSR_PR; \
151 lis r11,critical_stack_top@h; \ 151 lis r11,critirq_ctx@ha; \
152 ori r11,r11,critical_stack_top@l; \ 152 tophys(r11,r11); \
153 lwz r11,critirq_ctx@l(r11); \
153 beq 1f; \ 154 beq 1f; \
154 /* COMING FROM USER MODE */ \ 155 /* COMING FROM USER MODE */ \
155 mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ 156 mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\
156 lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ 157 lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
157 addi r11,r11,THREAD_SIZE; \ 1581: addi r11,r11,THREAD_SIZE-INT_FRAME_SIZE; /* Alloc an excpt frm */\
1581: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\
159 tophys(r11,r11); \ 159 tophys(r11,r11); \
160 stw r10,_CCR(r11); /* save various registers */\ 160 stw r10,_CCR(r11); /* save various registers */\
161 stw r12,GPR12(r11); \ 161 stw r12,GPR12(r11); \
@@ -996,16 +996,6 @@ empty_zero_page:
996swapper_pg_dir: 996swapper_pg_dir:
997 .space PGD_TABLE_SIZE 997 .space PGD_TABLE_SIZE
998 998
999
1000/* Stack for handling critical exceptions from kernel mode */
1001 .section .bss
1002 .align 12
1003exception_stack_bottom:
1004 .space 4096
1005critical_stack_top:
1006 .globl exception_stack_top
1007exception_stack_top:
1008
1009/* Room for two PTE pointers, usually the kernel and current user pointers 999/* Room for two PTE pointers, usually the kernel and current user pointers
1010 * to their respective root page table. 1000 * to their respective root page table.
1011 */ 1001 */