]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/head_40x.S
Merge git://git.infradead.org/mtd-2.6
[karo-tx-linux.git] / arch / powerpc / kernel / head_40x.S
index adc7f8097cd4f49c0df89a9df04847f21a676828..56d8e5d90c5be0b0518dcefaf2262a8ae97bd5da 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm/page.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
-#include <asm/ibm4xx.h>
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
 #include <asm/ppc_asm.h>
@@ -53,9 +52,9 @@
  *
  * This is all going to change RSN when we add bi_recs.......  -- Dan
  */
-       .text
-_GLOBAL(_stext)
-_GLOBAL(_start)
+       .section        .text.head, "ax"
+_ENTRY(_stext);
+_ENTRY(_start);
 
        /* Save parameters we are passed.
        */
@@ -90,9 +89,15 @@ turn_on_mmu:
  */
        . = 0xc0
 crit_save:
-_GLOBAL(crit_r10)
+_ENTRY(crit_r10)
        .space  4
-_GLOBAL(crit_r11)
+_ENTRY(crit_r11)
+       .space  4
+_ENTRY(crit_srr0)
+       .space  4
+_ENTRY(crit_srr1)
+       .space  4
+_ENTRY(saved_ksp_limit)
        .space  4
 
 /*
@@ -149,14 +154,14 @@ _GLOBAL(crit_r11)
        mfcr    r10;                    /* save CR in r10 for now          */\
        mfspr   r11,SPRN_SRR3;          /* check whether user or kernel    */\
        andi.   r11,r11,MSR_PR;                                              \
-       lis     r11,critical_stack_top@h;                                    \
-       ori     r11,r11,critical_stack_top@l;                                \
+       lis     r11,critirq_ctx@ha;                                          \
+       tophys(r11,r11);                                                     \
+       lwz     r11,critirq_ctx@l(r11);                                      \
        beq     1f;                                                          \
        /* COMING FROM USER MODE */                                          \
        mfspr   r11,SPRN_SPRG3;         /* if from user, start at top of   */\
        lwz     r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\
-       addi    r11,r11,THREAD_SIZE;                                         \
-1:     subi    r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame     */\
+1:     addi    r11,r11,THREAD_SIZE-INT_FRAME_SIZE; /* Alloc an excpt frm  */\
        tophys(r11,r11);                                                     \
        stw     r10,_CCR(r11);          /* save various registers          */\
        stw     r12,GPR12(r11);                                              \
@@ -290,7 +295,7 @@ label:
        /* If we are faulting a kernel address, we have to use the
         * kernel page tables.
         */
-       lis     r11, TASK_SIZE@h
+       lis     r11, PAGE_OFFSET@h
        cmplw   r10, r11
        blt+    3f
        lis     r11, swapper_pg_dir@h
@@ -482,7 +487,7 @@ label:
        /* If we are faulting a kernel address, we have to use the
         * kernel page tables.
         */
-       lis     r11, TASK_SIZE@h
+       lis     r11, PAGE_OFFSET@h
        cmplw   r10, r11
        blt+    3f
        lis     r11, swapper_pg_dir@h
@@ -582,7 +587,7 @@ label:
        /* If we are faulting a kernel address, we have to use the
         * kernel page tables.
         */
-       lis     r11, TASK_SIZE@h
+       lis     r11, PAGE_OFFSET@h
        cmplw   r10, r11
        blt+    3f
        lis     r11, swapper_pg_dir@h
@@ -772,7 +777,7 @@ finish_tlb_load:
        */
        lwz     r9, tlb_4xx_index@l(0)
        addi    r9, r9, 1
-       andi.   r9, r9, (PPC4XX_TLB_SIZE-1)
+       andi.   r9, r9, (PPC40X_TLB_SIZE-1)
        stw     r9, tlb_4xx_index@l(0)
 
 6:
@@ -815,7 +820,7 @@ finish_tlb_load:
  * The PowerPC 4xx family of processors do not have an FPU, so this just
  * returns.
  */
-_GLOBAL(giveup_fpu)
+_ENTRY(giveup_fpu)
        blr
 
 /* This is where the main kernel code starts.
@@ -995,24 +1000,7 @@ empty_zero_page:
        .space  4096
        .globl  swapper_pg_dir
 swapper_pg_dir:
-       .space  4096
-
-
-/* Stack for handling critical exceptions from kernel mode */
-       .section .bss
-        .align 12
-exception_stack_bottom:
-       .space  4096
-critical_stack_top:
-       .globl  exception_stack_top
-exception_stack_top:
-
-/* This space gets a copy of optional info passed to us by the bootstrap
- * which is used to pass parameters into the kernel like root=/dev/sda1, etc.
- */
-       .globl  cmd_line
-cmd_line:
-       .space  512
+       .space  PGD_TABLE_SIZE
 
 /* Room for two PTE pointers, usually the kernel and current user pointers
  * to their respective root page table.