aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_40x.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/head_40x.S')
-rw-r--r--arch/powerpc/kernel/head_40x.S24
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S
index 8552e67e3a8b..56d8e5d90c5b 100644
--- a/arch/powerpc/kernel/head_40x.S
+++ b/arch/powerpc/kernel/head_40x.S
@@ -93,6 +93,12 @@ _ENTRY(crit_r10)
93 .space 4 93 .space 4
94_ENTRY(crit_r11) 94_ENTRY(crit_r11)
95 .space 4 95 .space 4
96_ENTRY(crit_srr0)
97 .space 4
98_ENTRY(crit_srr1)
99 .space 4
100_ENTRY(saved_ksp_limit)
101 .space 4
96 102
97/* 103/*
98 * Exception vector entry code. This code runs with address translation 104 * Exception vector entry code. This code runs with address translation
@@ -148,14 +154,14 @@ _ENTRY(crit_r11)
148 mfcr r10; /* save CR in r10 for now */\ 154 mfcr r10; /* save CR in r10 for now */\
149 mfspr r11,SPRN_SRR3; /* check whether user or kernel */\ 155 mfspr r11,SPRN_SRR3; /* check whether user or kernel */\
150 andi. r11,r11,MSR_PR; \ 156 andi. r11,r11,MSR_PR; \
151 lis r11,critical_stack_top@h; \ 157 lis r11,critirq_ctx@ha; \
152 ori r11,r11,critical_stack_top@l; \ 158 tophys(r11,r11); \
159 lwz r11,critirq_ctx@l(r11); \
153 beq 1f; \ 160 beq 1f; \
154 /* COMING FROM USER MODE */ \ 161 /* COMING FROM USER MODE */ \
155 mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ 162 mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\
156 lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ 163 lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
157 addi r11,r11,THREAD_SIZE; \ 1641: 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); \ 165 tophys(r11,r11); \
160 stw r10,_CCR(r11); /* save various registers */\ 166 stw r10,_CCR(r11); /* save various registers */\
161 stw r12,GPR12(r11); \ 167 stw r12,GPR12(r11); \
@@ -996,16 +1002,6 @@ empty_zero_page:
996swapper_pg_dir: 1002swapper_pg_dir:
997 .space PGD_TABLE_SIZE 1003 .space PGD_TABLE_SIZE
998 1004
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 1005/* Room for two PTE pointers, usually the kernel and current user pointers
1010 * to their respective root page table. 1006 * to their respective root page table.
1011 */ 1007 */