sh: Fixup various PAGE_SIZE == 4096 assumptions.
[safe/jmp/linux-2.6] / arch / sh / kernel / head.S
index 3e7d00b..6aca4bc 100644 (file)
@@ -12,7 +12,6 @@
  */
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
-#include <asm/page.h>
 
 #ifdef CONFIG_CPU_SH4A
 #define SYNCO()                synco
@@ -34,7 +33,7 @@ ENTRY(empty_zero_page)
        .long   0x00360000      /* INITRD_START */
        .long   0x000a0000      /* INITRD_SIZE */
        .long   0
-       .balign 4096,0,4096
+       .balign PAGE_SIZE,0,PAGE_SIZE
 
        .text   
 /*
@@ -54,8 +53,10 @@ ENTRY(_stext)
        ldc     r0, sr
        !                       Initialize global interrupt mask
        mov     #0, r0
+#ifdef CONFIG_CPU_HAS_SR_RB
        ldc     r0, r6_bank
-
+#endif
+       
        /*
         * Prefetch if possible to reduce cache miss penalty.
         *
@@ -69,11 +70,14 @@ ENTRY(_stext)
        !
        mov.l   2f, r0
        mov     r0, r15         ! Set initial r15 (stack pointer)
-       mov     #0x20, r1       !
-       shll8   r1              ! r1 = 8192
+       mov     #(THREAD_SIZE >> 10), r1
+       shll8   r1              ! r1 = THREAD_SIZE
+       shll2   r1
        sub     r1, r0          !
+#ifdef CONFIG_CPU_HAS_SR_RB
        ldc     r0, r7_bank     ! ... and initial thread_info
-
+#endif
+       
        !                       Clear BSS area
        mov.l   3f, r1
        add     #4, r1
@@ -96,7 +100,11 @@ ENTRY(_stext)
         nop
 
        .balign 4
+#if defined(CONFIG_CPU_SH2)
+1:     .long   0x000000F0              ! IMASK=0xF
+#else
 1:     .long   0x400080F0              ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF
+#endif
 2:     .long   init_thread_union+THREAD_SIZE
 3:     .long   __bss_start
 4:     .long   _end