misc: Fix allocation 'borrowed' by vhost_net
[safe/jmp/linux-2.6] / arch / arm / kernel / head-nommu.S
index 5d78ffb..573b803 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 
 #include <asm/assembler.h>
-#include <asm/mach-types.h>
 #include <asm/ptrace.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
  * numbers for r1.
  *
  */
-       .section ".text.head", "ax"
-       .type   stext, %function
+       __HEAD
 ENTRY(stext)
-       msr     cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
+       setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode
                                                @ and irqs disabled
 #ifndef CONFIG_CPU_CP15
        ldr     r9, =CONFIG_PROCESSOR_ID
@@ -52,16 +50,21 @@ ENTRY(stext)
 
        ldr     r13, __switch_data              @ address to jump to after
                                                @ the initialization is done
-       adr     lr, __after_proc_init           @ return (PIC) address
-       add     pc, r10, #PROCINFO_INITFUNC
+       adr     lr, BSYM(__after_proc_init)     @ return (PIC) address
+ ARM(  add     pc, r10, #PROCINFO_INITFUNC     )
+ THUMB(        add     r12, r10, #PROCINFO_INITFUNC    )
+ THUMB(        mov     pc, r12                         )
+ENDPROC(stext)
 
 /*
  * Set the Control Register and Read the process ID.
  */
-       .type   __after_proc_init, %function
 __after_proc_init:
 #ifdef CONFIG_CPU_CP15
-       mrc     p15, 0, r0, c1, c0, 0           @ read control reg
+       /*
+        * CP15 system control register value returned in r0 from
+        * the CPU init function.
+        */
 #ifdef CONFIG_ALIGNMENT_TRAP
        orr     r0, r0, #CR_A
 #else
@@ -84,8 +87,10 @@ __after_proc_init:
        mcr     p15, 0, r0, c1, c0, 0           @ write control reg
 #endif /* CONFIG_CPU_CP15 */
 
-       mov     pc, r13                         @ clear the BSS and jump
+       mov     r3, r13
+       mov     pc, r3                          @ clear the BSS and jump
                                                @ to start_kernel
+ENDPROC(__after_proc_init)
        .ltorg
 
 #include "head-common.S"