From: Olaf Hering <olh@suse.de>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Michael Ellerman <michael@ellerman.id.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] return to OF via trap, not exit
Date: Thu, 23 Mar 2006 22:03:57 +0100 [thread overview]
Message-ID: <20060323210357.GC24667@suse.de> (raw)
In-Reply-To: <EA07A673-A993-490A-ADEC-29CFDF1DDAC1@kernel.crashing.org>
On Mon, Mar 06, Segher Boessenkool wrote:
> That's better than always calling trap, sure. Is there any reason
> you can't just do it on Macs though? Because the problem you're trying
> to work around only happens there.
Maybe something like this? Only compile tested
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>
arch/powerpc/kernel/prom_init.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
Index: linux-2.6.16-olh/arch/powerpc/kernel/prom_init.c
===================================================================
--- linux-2.6.16-olh.orig/arch/powerpc/kernel/prom_init.c
+++ linux-2.6.16-olh/arch/powerpc/kernel/prom_init.c
@@ -397,6 +397,11 @@ static void __init __attribute__((noretu
reason = PTRRELOC(reason);
#endif
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 */
call_prom("exit", 0, 0);
@@ -2060,15 +2065,6 @@ unsigned long __init prom_init(unsigned
*/
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
* between pSeries SMP and pSeries LPAR
@@ -2078,6 +2074,15 @@ unsigned long __init prom_init(unsigned
prom_setprop(_prom->chosen, "/chosen", "linux,platform",
&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
/*
* On pSeries, inform the firmware about our capabilities
next prev parent reply other threads:[~2006-03-23 21:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-04 19:10 [PATCH] return to OF via trap, not exit Olaf Hering
2006-03-06 1:12 ` Michael Ellerman
2006-03-06 7:38 ` Olaf Hering
2006-03-06 7:41 ` Segher Boessenkool
2006-03-06 7:43 ` Olaf Hering
2006-03-06 7:46 ` Segher Boessenkool
2006-03-06 7:49 ` Olaf Hering
2006-03-06 7:57 ` Segher Boessenkool
2006-03-23 21:03 ` Olaf Hering [this message]
2006-03-23 23:11 ` Michael Ellerman
2006-03-24 12:13 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060323210357.GC24667@suse.de \
--to=olh@suse.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).