summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/head_booke.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-03 13:30:03 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-03 13:30:03 +1100
commit652e8f8d579d61745094e36b4ff085026a332e73 (patch)
tree44145576f9cdf0b777dee0d0961f5499ea88bec8 /arch/powerpc/kernel/head_booke.h
parent501cb16d3cfdcca99ac26fe122079f2a43b046b8 (diff)
parent6c7120902305b3a21460cd2f0f917a39307df566 (diff)
Merge commit 'jwb/next' into next
Diffstat (limited to 'arch/powerpc/kernel/head_booke.h')
-rw-r--r--arch/powerpc/kernel/head_booke.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index 38e242eb0ef8..95f39f1e68d4 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -10,6 +10,15 @@
mtspr SPRN_IVOR##vector_number,r26; \
sync
+#if (THREAD_SHIFT < 15)
+#define ALLOC_STACK_FRAME(reg, val) \
+ addi reg,reg,val
+#else
+#define ALLOC_STACK_FRAME(reg, val) \
+ addis reg,reg,val@ha; \
+ addi reg,reg,val@l
+#endif
+
#define NORMAL_EXCEPTION_PROLOG \
mtspr SPRN_SPRG0,r10; /* save two registers to work with */\
mtspr SPRN_SPRG1,r11; \
@@ -20,7 +29,7 @@
beq 1f; \
mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\
lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\
- addi r1,r1,THREAD_SIZE; \
+ ALLOC_STACK_FRAME(r1, THREAD_SIZE); \
1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\
mr r11,r1; \
stw r10,_CCR(r11); /* save various registers */\