diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-11-29 13:22:56 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-07 02:04:53 -0500 |
commit | 40dfef66a9e3d4a308c3ed7355c9a89e68c08ffc (patch) | |
tree | d72e4a38bb15409941a92b366228415385a14492 /arch/powerpc/kernel/prom_init.c | |
parent | cee72d5bb48952f2e50acd2610d52ea82f7092c9 (diff) |
powerpc/powernv: Workaround OFW issues in prom_init.c
Open Firmware on OPAL machines seems to have issues if we close
stdin and/or we try to print things after calling "quiesce" so
we avoid doing both.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index cc584865b3df..f4f9f2f14322 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2969,9 +2969,11 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2969 | /* | 2969 | /* |
2970 | * in case stdin is USB and still active on IBM machines... | 2970 | * in case stdin is USB and still active on IBM machines... |
2971 | * Unfortunately quiesce crashes on some powermacs if we have | 2971 | * Unfortunately quiesce crashes on some powermacs if we have |
2972 | * closed stdin already (in particular the powerbook 101). | 2972 | * closed stdin already (in particular the powerbook 101). It |
2973 | * appears that the OPAL version of OFW doesn't like it either. | ||
2973 | */ | 2974 | */ |
2974 | if (RELOC(of_platform) != PLATFORM_POWERMAC) | 2975 | if (RELOC(of_platform) != PLATFORM_POWERMAC && |
2976 | RELOC(of_platform) != PLATFORM_OPAL) | ||
2975 | prom_close_stdin(); | 2977 | prom_close_stdin(); |
2976 | 2978 | ||
2977 | /* | 2979 | /* |
@@ -2987,8 +2989,12 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2987 | * is common to us and kexec | 2989 | * is common to us and kexec |
2988 | */ | 2990 | */ |
2989 | hdr = RELOC(dt_header_start); | 2991 | hdr = RELOC(dt_header_start); |
2990 | prom_printf("returning from prom_init\n"); | 2992 | |
2991 | prom_debug("->dt_header_start=0x%x\n", hdr); | 2993 | /* Don't print anything after quiesce under OPAL, it crashes OFW */ |
2994 | if (RELOC(of_platform) != PLATFORM_OPAL) { | ||
2995 | prom_printf("returning from prom_init\n"); | ||
2996 | prom_debug("->dt_header_start=0x%x\n", hdr); | ||
2997 | } | ||
2992 | 2998 | ||
2993 | #ifdef CONFIG_PPC32 | 2999 | #ifdef CONFIG_PPC32 |
2994 | reloc_got2(-offset); | 3000 | reloc_got2(-offset); |