]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/head_32.S
Pull extend-notify-die into release branch
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / head_32.S
index d9dbbd426744af01579f589f7aadd55f714df47a..b102e3a2415e1fe339324745e4c3a6df75530a8d 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include <linux/config.h>
-#include <asm/processor.h>
+#include <asm/reg.h>
 #include <asm/page.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
@@ -55,8 +55,8 @@
 1:
 
        .text
-       .stabs  "arch/ppc/kernel/",N_SO,0,0,0f
-       .stabs  "head.S",N_SO,0,0,0f
+       .stabs  "arch/powerpc/kernel/",N_SO,0,0,0f
+       .stabs  "head_32.S",N_SO,0,0,0f
 0:
        .globl  _stext
 _stext:
@@ -153,9 +153,6 @@ __after_mmu_off:
        bl      flush_tlbs
 
        bl      initial_bats
-#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT)
-       bl      setup_disp_bat
-#endif
 
 /*
  * Call setup_cpu for CPU 0 and initialize 6xx Idle
@@ -210,7 +207,7 @@ turn_on_mmu:
        .globl  __secondary_hold
 __secondary_hold:
        /* tell the master we're here */
-       stw     r3,4(0)
+       stw     r3,__secondary_hold_acknowledge@l(0)
 #ifdef CONFIG_SMP
 100:   lwz     r4,0(0)
        /* wait until we're told to start */
@@ -223,6 +220,13 @@ __secondary_hold:
        b       .
 #endif /* CONFIG_SMP */
 
+       .globl  __secondary_hold_spinloop
+__secondary_hold_spinloop:
+       .long   0
+       .globl  __secondary_hold_acknowledge
+__secondary_hold_acknowledge:
+       .long   -1
+
 /*
  * Exception entry code.  This code runs with address translation
  * turned off, i.e. using physical addresses.
@@ -267,6 +271,9 @@ __secondary_hold:
        li      r10,MSR_KERNEL & ~(MSR_IR|MSR_DR); /* can take exceptions */ \
        MTMSRD(r10);                    /* (except for mach check in rtas) */ \
        stw     r0,GPR0(r11);   \
+       lis     r10,0x7265;             /* put exception frame marker */ \
+       addi    r10,r10,0x6773; \
+       stw     r10,8(r11);     \
        SAVE_4GPRS(3, r11);     \
        SAVE_2GPRS(7, r11)
 
@@ -290,7 +297,7 @@ label:                                              \
 
 #define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret)    \
        li      r10,trap;                                       \
-       stw     r10,TRAP(r11);                                  \
+       stw     r10,_TRAP(r11);                                 \
        li      r10,MSR_KERNEL;                                 \
        copyee(r10, r9);                                        \
        bl      tfer;                                           \
@@ -834,10 +841,10 @@ relocate_kernel:
  * r3 = dest addr, r4 = source addr, r5 = copy limit, r6 = start offset
  * on exit, r3, r4, r5 are unchanged, r6 is updated to be >= r5.
  */
-copy_and_flush:
+_GLOBAL(copy_and_flush)
        addi    r5,r5,-4
        addi    r6,r6,-4
-4:     li      r0,L1_CACHE_LINE_SIZE/4
+4:     li      r0,L1_CACHE_BYTES/4
        mtctr   r0
 3:     addi    r6,r6,4                 /* copy a cache line */
        lwzx    r0,r6,r4
@@ -1297,31 +1304,6 @@ initial_bats:
        isync
        blr
 
-#if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT)
-setup_disp_bat:
-       /*
-        * setup the display bat prepared for us in prom.c
-        */
-       mflr    r8
-       bl      reloc_offset
-       mtlr    r8
-       addis   r8,r3,disp_BAT@ha
-       addi    r8,r8,disp_BAT@l
-       lwz     r11,0(r8)
-       lwz     r8,4(r8)
-       mfspr   r9,SPRN_PVR
-       rlwinm  r9,r9,16,16,31          /* r9 = 1 for 601, 4 for 604 */
-       cmpwi   0,r9,1
-       beq     1f
-       mtspr   SPRN_DBAT3L,r8
-       mtspr   SPRN_DBAT3U,r11
-       blr
-1:     mtspr   SPRN_IBAT3L,r8
-       mtspr   SPRN_IBAT3U,r11
-       blr
-
-#endif /* !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) */
-
 
 #ifdef CONFIG_8260
 /* Jump into the system reset for the rom.