]> Pileus Git - ~andy/linux/commitdiff
sparc32: introduce sparc32_start_kernel called from head_32.S
authorSam Ravnborg <sam@ravnborg.org>
Fri, 25 May 2012 21:20:08 +0000 (21:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 May 2012 06:52:42 +0000 (23:52 -0700)
This gives us a C hook before we call start_kernel()

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
arch/sparc/kernel/head_32.S
arch/sparc/kernel/kernel.h
arch/sparc/kernel/setup_32.c

index f22a729dfb3d7f246704fcc91aeb420bea3dbfa0..6c6b8c27c1b803a5e9b4f93cbb965db01b698d52 100644 (file)
@@ -661,16 +661,10 @@ continue_boot:
                wr      %g3, PSR_ET, %psr
                WRITE_PAUSE
 
-               /* First we call prom_init() to set up PROMLIB, then
-                * off to start_kernel().
-                */
-
+               /* Call sparc32_start_kernel(struct linux_romvec *rp) */
                sethi   %hi(prom_vector_p), %g5
                ld      [%g5 + %lo(prom_vector_p)], %o0
-               call    prom_init
-                nop
-
-               call    start_kernel
+               call    sparc32_start_kernel
                 nop
 
                /* We should not get here. */
index a86372d345870202a8bb27e9d72c18b8f7574cb7..291bb5de9ce0963184518a9a00872370821075d1 100644 (file)
@@ -26,6 +26,9 @@ static inline unsigned long kimage_addr_to_ra(const char *p)
 #endif
 
 #ifdef CONFIG_SPARC32
+/* setup_32.c */
+void sparc32_start_kernel(struct linux_romvec *rp);
+
 /* cpu.c */
 extern void cpu_probe(void);
 
index c052313f4dc578700193abaf5fc6e9b127e66e0a..68dd63dea36f456a727a1636af7473dc311a6ebf 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/cpu.h>
 #include <linux/kdebug.h>
 #include <linux/export.h>
+#include <linux/start_kernel.h>
 
 #include <asm/io.h>
 #include <asm/processor.h>
@@ -244,6 +245,15 @@ struct tt_entry *sparc_ttable;
 
 struct pt_regs fake_swapper_regs;
 
+/* Called from head_32.S - before we have setup anything
+ * in the kernel. Be very careful with what you do here.
+ */
+void __init sparc32_start_kernel(struct linux_romvec *rp)
+{
+       prom_init(rp);
+       start_kernel();
+}
+
 void __init setup_arch(char **cmdline_p)
 {
        int i;