]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: restore prom_cif_stack
authorDave Kleikamp <dave.kleikamp@oracle.com>
Fri, 20 Mar 2015 21:38:42 +0000 (16:38 -0500)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Mon, 18 Apr 2016 16:42:49 +0000 (11:42 -0500)
Commit ef3e035c stopped using the firmware stack and thus stopped saving
it's location in p1275buf. However, kexec wants to be using the firmware
stack when launching the new kernel.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
arch/sparc/include/asm/oplib_64.h
arch/sparc/kernel/head_64.S
arch/sparc/prom/init_64.c
arch/sparc/prom/p1275.c

index 2e3a4add8591b61455af1730e3667d1f26c0f6fa..1834b16c5975979442632b73f5a9dbfbe7a03135 100644 (file)
@@ -62,7 +62,7 @@ struct linux_mem_p1275 {
 /* You must call prom_init() before using any of the library services,
  * preferably as early as possible.  Pass it the romvec pointer.
  */
-void prom_init(void *cif_handler);
+void prom_init(void *cif_handler, void *cif_stack);
 void prom_init_report(void);
 
 /* Boot argument acquisition, returns the boot command line string. */
index 13a9689776c572ab59f22dad1ec77270791b152d..f58c2567e8dc94986d507d657e85370ee94cfe1e 100644 (file)
@@ -687,6 +687,7 @@ tlb_fixup_done:
        sethi   %hi(init_thread_union), %g6
        or      %g6, %lo(init_thread_union), %g6
        ldx     [%g6 + TI_TASK], %g4
+       mov     %sp, %l6
 
        wr      %g0, ASI_P, %asi
        mov     1, %g1
@@ -719,6 +720,7 @@ tlb_fixup_done:
         nop
 #endif
 
+       mov     %l6, %o1
        call    prom_init
         mov    %l7, %o0                        ! OpenPROM cif handler
 
index 110b0d78b864113c2825271724b9363b5fb8e1ba..d95db755828f351f18e2c1f1b160ebf571edead6 100644 (file)
@@ -26,13 +26,13 @@ phandle prom_chosen_node;
  * It gets passed the pointer to the PROM vector.
  */
 
-extern void prom_cif_init(void *);
+extern void prom_cif_init(void *, void *);
 
-void __init prom_init(void *cif_handler)
+void __init prom_init(void *cif_handler, void *cif_stack)
 {
        phandle node;
 
-       prom_cif_init(cif_handler);
+       prom_cif_init(cif_handler, cif_stack);
 
        prom_chosen_node = prom_finddevice(prom_chosen_path);
        if (!prom_chosen_node || (s32)prom_chosen_node == -1)
index 545d8bb79b65245984ed36c7963bd3c97768a2f5..b2340f008ae06a27614f2fc1c78e3b45b36946b0 100644 (file)
@@ -20,6 +20,7 @@
 struct {
        long prom_callback;                     /* 0x00 */
        void (*prom_cif_handler)(long *);       /* 0x08 */
+       unsigned long prom_cif_stack;           /* 0x10 */
 } p1275buf;
 
 extern void prom_world(int);
@@ -51,4 +52,5 @@ void p1275_cmd_direct(unsigned long *args)
 void prom_cif_init(void *cif_handler, void *cif_stack)
 {
        p1275buf.prom_cif_handler = (void (*)(long *))cif_handler;
+       p1275buf.prom_cif_stack = (unsigned long)cif_stack;
 }