Merge commit 'jwb/next' into next
[deliverable/linux.git] / arch / powerpc / kernel / head_booke.h
index fce2df988504d6e8962b31656ceec6dceff7ac44..95f39f1e68d449036b0206735936513c60533cdc 100644 (file)
                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          */\
 
 /* only on e500mc/e200 */
 #define DEBUG_STACK_BASE       dbgirq_ctx
-#ifdef CONFIG_PPC_E500MC
-#define DEBUG_SPRG             SPRN_SPRG9
-#else
+#ifdef CONFIG_E200
 #define DEBUG_SPRG             SPRN_SPRG6W
+#else
+#define DEBUG_SPRG             SPRN_SPRG9
 #endif
 
 #define EXC_LVL_FRAME_OVERHEAD (THREAD_SIZE - INT_FRAME_SIZE - EXC_LVL_SIZE)
@@ -279,7 +288,7 @@ label:
        lwz     r11,GPR11(r8);                                                \
        mfspr   r8,DEBUG_SPRG;                                                \
                                                                              \
-       RFDI;                                                                 \
+       PPC_RFDI;                                                                     \
        b       .;                                                            \
                                                                              \
        /* continue normal handling for a debug exception... */               \
This page took 0.025362 seconds and 5 git commands to generate.