aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r--arch/powerpc/kernel/head_64.S10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index aff5398a5f63..1111fcec7673 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -278,8 +278,12 @@ exception_marker:
278 beq- 1f; \ 278 beq- 1f; \
279 ld r1,PACAKSAVE(r13); /* kernel stack to use */ \ 279 ld r1,PACAKSAVE(r13); /* kernel stack to use */ \
2801: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \ 2801: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \
281 bge- cr1,bad_stack; /* abort if it is */ \ 281 bge- cr1,2f; /* abort if it is */ \
282 std r9,_CCR(r1); /* save CR in stackframe */ \ 282 b 3f; \
2832: li r1,(n); /* will be reloaded later */ \
284 sth r1,PACA_TRAP_SAVE(r13); \
285 b bad_stack; \
2863: std r9,_CCR(r1); /* save CR in stackframe */ \
283 std r11,_NIP(r1); /* save SRR0 in stackframe */ \ 287 std r11,_NIP(r1); /* save SRR0 in stackframe */ \
284 std r12,_MSR(r1); /* save SRR1 in stackframe */ \ 288 std r12,_MSR(r1); /* save SRR1 in stackframe */ \
285 std r10,0(r1); /* make stack chain pointer */ \ 289 std r10,0(r1); /* make stack chain pointer */ \
@@ -940,6 +944,8 @@ bad_stack:
940 SAVE_2GPRS(7,r1) 944 SAVE_2GPRS(7,r1)
941 SAVE_10GPRS(12,r1) 945 SAVE_10GPRS(12,r1)
942 SAVE_10GPRS(22,r1) 946 SAVE_10GPRS(22,r1)
947 lhz r12,PACA_TRAP_SAVE(r13)
948 std r12,_TRAP(r1)
943 addi r11,r1,INT_FRAME_SIZE 949 addi r11,r1,INT_FRAME_SIZE
944 std r11,0(r1) 950 std r11,0(r1)
945 li r12,0 951 li r12,0