提交 add60ef3 编写于 作者: O Olaf Hering 提交者: Paul Mackerras

[PATCH] powerpc: return to OF via trap, not exit

Do not call prom exit prom_panic. It clears the screen and the exit
message is lost.

On some (or all?) pmacs it causes another crash when OF tries to print
the date and time in its banner.

Set of_platform earlier to catch more prom_panic() calls.
Signed-off-by: NOlaf Hering <olh@suse.de>
Acked-by: NSegher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 069007ae
...@@ -397,6 +397,11 @@ static void __init __attribute__((noreturn)) prom_panic(const char *reason) ...@@ -397,6 +397,11 @@ static void __init __attribute__((noreturn)) prom_panic(const char *reason)
reason = PTRRELOC(reason); reason = PTRRELOC(reason);
#endif #endif
prom_print(reason); prom_print(reason);
/* Do not call exit because it clears the screen on pmac
* it also causes some sort of double-fault on early pmacs */
if (RELOC(of_platform) == PLATFORM_POWERMAC)
asm("trap\n");
/* ToDo: should put up an SRC here on p/iSeries */ /* ToDo: should put up an SRC here on p/iSeries */
call_prom("exit", 0, 0); call_prom("exit", 0, 0);
...@@ -2060,15 +2065,6 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, ...@@ -2060,15 +2065,6 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
*/ */
prom_init_stdout(); prom_init_stdout();
/* Bail if this is a kdump kernel. */
if (PHYSICAL_START > 0)
prom_panic("Error: You can't boot a kdump kernel from OF!\n");
/*
* Check for an initrd
*/
prom_check_initrd(r3, r4);
/* /*
* Get default machine type. At this point, we do not differentiate * Get default machine type. At this point, we do not differentiate
* between pSeries SMP and pSeries LPAR * between pSeries SMP and pSeries LPAR
...@@ -2078,6 +2074,15 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, ...@@ -2078,6 +2074,15 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
prom_setprop(_prom->chosen, "/chosen", "linux,platform", prom_setprop(_prom->chosen, "/chosen", "linux,platform",
&getprop_rval, sizeof(getprop_rval)); &getprop_rval, sizeof(getprop_rval));
/* Bail if this is a kdump kernel. */
if (PHYSICAL_START > 0)
prom_panic("Error: You can't boot a kdump kernel from OF!\n");
/*
* Check for an initrd
*/
prom_check_initrd(r3, r4);
#ifdef CONFIG_PPC_PSERIES #ifdef CONFIG_PPC_PSERIES
/* /*
* On pSeries, inform the firmware about our capabilities * On pSeries, inform the firmware about our capabilities
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册