aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorOlaf Hering <olh@suse.de>2006-03-23 16:03:57 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-26 22:48:36 -0500
commitadd60ef303809087999412209d24d400a1c96670 (patch)
treef95a1105c5f680149131eb56084e86321b41170e /arch/powerpc
parent069007ae07ab9286fbe42e9a66b78e184f752a05 (diff)
[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: Olaf Hering <olh@suse.de> Acked-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/prom_init.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 813c2cd194c2..0d0887844501 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -397,6 +397,11 @@ static void __init __attribute__((noreturn)) prom_panic(const char *reason)
397 reason = PTRRELOC(reason); 397 reason = PTRRELOC(reason);
398#endif 398#endif
399 prom_print(reason); 399 prom_print(reason);
400 /* Do not call exit because it clears the screen on pmac
401 * it also causes some sort of double-fault on early pmacs */
402 if (RELOC(of_platform) == PLATFORM_POWERMAC)
403 asm("trap\n");
404
400 /* ToDo: should put up an SRC here on p/iSeries */ 405 /* ToDo: should put up an SRC here on p/iSeries */
401 call_prom("exit", 0, 0); 406 call_prom("exit", 0, 0);
402 407
@@ -2060,15 +2065,6 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
2060 */ 2065 */
2061 prom_init_stdout(); 2066 prom_init_stdout();
2062 2067
2063 /* Bail if this is a kdump kernel. */
2064 if (PHYSICAL_START > 0)
2065 prom_panic("Error: You can't boot a kdump kernel from OF!\n");
2066
2067 /*
2068 * Check for an initrd
2069 */
2070 prom_check_initrd(r3, r4);
2071
2072 /* 2068 /*
2073 * Get default machine type. At this point, we do not differentiate 2069 * Get default machine type. At this point, we do not differentiate
2074 * between pSeries SMP and pSeries LPAR 2070 * between pSeries SMP and pSeries LPAR
@@ -2078,6 +2074,15 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
2078 prom_setprop(_prom->chosen, "/chosen", "linux,platform", 2074 prom_setprop(_prom->chosen, "/chosen", "linux,platform",
2079 &getprop_rval, sizeof(getprop_rval)); 2075 &getprop_rval, sizeof(getprop_rval));
2080 2076
2077 /* Bail if this is a kdump kernel. */
2078 if (PHYSICAL_START > 0)
2079 prom_panic("Error: You can't boot a kdump kernel from OF!\n");
2080
2081 /*
2082 * Check for an initrd
2083 */
2084 prom_check_initrd(r3, r4);
2085
2081#ifdef CONFIG_PPC_PSERIES 2086#ifdef CONFIG_PPC_PSERIES
2082 /* 2087 /*
2083 * On pSeries, inform the firmware about our capabilities 2088 * On pSeries, inform the firmware about our capabilities