]> Pileus Git - ~andy/linux/blobdiff - arch/mips/kernel/head.S
[MIPS] Always do the ARC64_TWIDDLE_PC thing.
[~andy/linux] / arch / mips / kernel / head.S
index 6f57ca44291f98a445eeb99b294a67ada0d02a35..2367687310630c40a68b11423a21dab45cc6b2a9 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/threads.h>
 
+#include <asm/addrspace.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/irqflags.h>
 
 #include <kernel-entry-init.h>
 
-       .macro  ARC64_TWIDDLE_PC
-#if defined(CONFIG_ARC64) || defined(CONFIG_MAPPED_KERNEL)
-       /* We get launched at a XKPHYS address but the kernel is linked to
-          run at a KSEG0 address, so jump there.  */
-       PTR_LA  t0, \@f
-       jr      t0
-\@:
-#endif
-       .endm
-
        /*
         * inputs are the text nasid in t1, data nasid in t2.
         */
 #endif
        .endm
 
+#ifndef CONFIG_NO_EXCEPT_FILL
        /*
         * Reserved space for exception handlers.
         * Necessary for machines which link their kernels at KSEG0.
         */
        .fill   0x400
+#endif
 
-EXPORT(stext)                                  # used for profiling
 EXPORT(_stext)
 
-#ifdef CONFIG_MIPS_SIM
+#ifdef CONFIG_BOOT_RAW
        /*
         * Give us a fighting chance of running if execution beings at the
         * kernel load address.  This is needed because this platform does
         * not have a ELF loader yet.
         */
-       j       kernel_entry
-#endif
        __INIT
+#endif
+
+       __INIT_REFOK
 
 NESTED(kernel_entry, 16, sp)                   # kernel entry point
 
@@ -154,7 +147,11 @@ NESTED(kernel_entry, 16, sp)                       # kernel entry point
 
        setup_c0_status_pri
 
-       ARC64_TWIDDLE_PC
+       /* We might not get launched at the address the kernel is linked to,
+          so we jump there.  */
+       PTR_LA  t0, 0f
+       jr      t0
+0:
 
 #ifdef CONFIG_MIPS_MT_SMTC
        /*
@@ -197,9 +194,7 @@ NESTED(kernel_entry, 16, sp)                        # kernel entry point
        j               start_kernel
        END(kernel_entry)
 
-#ifdef CONFIG_QEMU
        __INIT
-#endif
 
 #ifdef CONFIG_SMP
 /*