All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Reword the "returning from prom_init" message
@ 2015-01-12  9:48 Michael Ellerman
  2015-01-12 17:27 ` Paul Clarke
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2015-01-12  9:48 UTC (permalink / raw)
  To: linuxppc-dev

We get way too many bug reports that say "the kernel is hung in
prom_init", which stems from the fact that the last piece of output
people see is "returning from prom_init".

The kernel is almost never hung in prom_init(), it's just that it's
crashed somewhere after prom_init() but prior to the console coming up.

The existing message should give a clue to that, ie. "returning from"
indicates that prom_init() has finished, but it doesn't seem to work.
Let's try something different.

This prints:

  Calling quiesce...
  Shutting down Open Firmware, booting Linux via __start() ...

Which hopefully makes it clear that prom_init() is not the problem, and
although __start() probably isn't either, it's at least the right place
to begin looking.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/prom_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 1a85d8f96739..bd3e0d8ac8fd 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2910,7 +2910,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
 
 	/* Don't print anything after quiesce under OPAL, it crashes OFW */
 	if (of_platform != PLATFORM_OPAL) {
-		prom_printf("returning from prom_init\n");
+		prom_printf("Shutting down Open Firmware, booting Linux via __start() ...\n");
 		prom_debug("->dt_header_start=0x%x\n", hdr);
 	}
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Reword the "returning from prom_init" message
  2015-01-12  9:48 [PATCH] powerpc: Reword the "returning from prom_init" message Michael Ellerman
@ 2015-01-12 17:27 ` Paul Clarke
  2015-01-13  0:58   ` Michael Ellerman
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Clarke @ 2015-01-12 17:27 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On 01/12/2015 03:48 AM, Michael Ellerman wrote:
> We get way too many bug reports that say "the kernel is hung in
> prom_init", which stems from the fact that the last piece of output
> people see is "returning from prom_init".
>
> The kernel is almost never hung in prom_init(), it's just that it's
> crashed somewhere after prom_init() but prior to the console coming up.
>
> The existing message should give a clue to that, ie. "returning from"
> indicates that prom_init() has finished, but it doesn't seem to work.
> Let's try something different.
>
> This prints:
>
>    Calling quiesce...
>    Shutting down Open Firmware, booting Linux via __start() ...
>
> Which hopefully makes it clear that prom_init() is not the problem, and
> although __start() probably isn't either, it's at least the right place
> to begin looking.

I'm very much in favor of anything that increases usability or decreases 
confusion.

I worry about confusion caused by any phrase that begins "Shutting 
down.."  Even if accurate, I wonder if something more positive that 
indicates that, at least at this point, things are continuing to proceed 
along would be preferred.

Perhaps something like "Transferring control from Open Firmware to 
kernel (via __start) ...".

(Do we know for certain that what is about to be invoked is "Linux" 
per-se, or can it be something else that has a "__start"?)

PC

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Reword the "returning from prom_init" message
  2015-01-12 17:27 ` Paul Clarke
@ 2015-01-13  0:58   ` Michael Ellerman
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2015-01-13  0:58 UTC (permalink / raw)
  To: Paul Clarke; +Cc: linuxppc-dev

On Mon, 2015-01-12 at 11:27 -0600, Paul Clarke wrote:
> On 01/12/2015 03:48 AM, Michael Ellerman wrote:
> > We get way too many bug reports that say "the kernel is hung in
> > prom_init", which stems from the fact that the last piece of output
> > people see is "returning from prom_init".
> >
> > The kernel is almost never hung in prom_init(), it's just that it's
> > crashed somewhere after prom_init() but prior to the console coming up.
> >
> > The existing message should give a clue to that, ie. "returning from"
> > indicates that prom_init() has finished, but it doesn't seem to work.
> > Let's try something different.
> >
> > This prints:
> >
> >    Calling quiesce...
> >    Shutting down Open Firmware, booting Linux via __start() ...
> >
> > Which hopefully makes it clear that prom_init() is not the problem, and
> > although __start() probably isn't either, it's at least the right place
> > to begin looking.
> 
> I'm very much in favor of anything that increases usability or decreases 
> confusion.
> 
> I worry about confusion caused by any phrase that begins "Shutting 
> down.."  Even if accurate, I wonder if something more positive that 
> indicates that, at least at this point, things are continuing to proceed 
> along would be preferred.

True.

> Perhaps something like "Transferring control from Open Firmware to 
> kernel (via __start) ...".

Yeah, that's not quite accurate either :)

Linux already has control, but up until that point it is running alongside OF
and using its services. After prom_init() returns we take over the machine
entirely.

Maybe "Leaving Open Firmware, booting Linux ..."

Or just "Booting Linux ...".

> (Do we know for certain that what is about to be invoked is "Linux" 
> per-se, or can it be something else that has a "__start"?)

Yes it's Linux.

Although we treat prom_init() as a separate thing, it's just linked into the
regular kernel binary. So the "transfer" here is really just a function call.
But it signifies a switch from code that runs alongside Open Firmware
(prom_init()), to code that doesn't (the rest of the kernel).

We have talked about actually linking them separately but we've never bothered,
it wouldn't buy us much.

cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Reword the "returning from prom_init" message
  2015-04-01  6:56 ` Jeremy Kerr
@ 2015-04-01  9:32   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2015-04-01  9:32 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: pc, linuxppc-dev

On Wed, 2015-04-01 at 14:56 +0800, Jeremy Kerr wrote:
> Hi Michael,
> 
> > Let's try something different.
> > 
> > This prints:
> > 
> >   Quiescing Open Firmware ...
> >   Booting Linux via __start() ...
> 
> "returning from prom_init" has been an emblem of the powerpc kernel boot
> since old times. I feel like we should give the old message a Viking
> funeral and pick a date for a minute of silence.

Let's drink to that :-)

> (Wistfully-)Acked-by: Jeremy Kerr <jk@ozlabs.org>
> 
> Cheers,
> 
> 
> Jeremy
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc: Reword the "returning from prom_init" message
  2015-03-30  6:38 Michael Ellerman
@ 2015-04-01  6:56 ` Jeremy Kerr
  2015-04-01  9:32   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Kerr @ 2015-04-01  6:56 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: pc

Hi Michael,

> Let's try something different.
> 
> This prints:
> 
>   Quiescing Open Firmware ...
>   Booting Linux via __start() ...

"returning from prom_init" has been an emblem of the powerpc kernel boot
since old times. I feel like we should give the old message a Viking
funeral and pick a date for a minute of silence.

(Wistfully-)Acked-by: Jeremy Kerr <jk@ozlabs.org>

Cheers,


Jeremy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] powerpc: Reword the "returning from prom_init" message
@ 2015-03-30  6:38 Michael Ellerman
  2015-04-01  6:56 ` Jeremy Kerr
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2015-03-30  6:38 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: pc

We get way too many bug reports that say "the kernel is hung in
prom_init", which stems from the fact that the last piece of output
people see is "returning from prom_init".

The kernel is almost never hung in prom_init(), it's just that it's
crashed somewhere after prom_init() but prior to the console coming up.

The existing message should give a clue to that, ie. "returning from"
indicates that prom_init() has finished, but it doesn't seem to work.
Let's try something different.

This prints:

  Quiescing Open Firmware ...
  Booting Linux via __start() ...

Which hopefully makes it clear that prom_init() is not the problem, and
although __start() probably isn't either, it's at least the right place
to begin looking.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/prom_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 1a85d8f96739..fd1fe4c37599 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2898,7 +2898,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
 	 * Call OF "quiesce" method to shut down pending DMA's from
 	 * devices etc...
 	 */
-	prom_printf("Calling quiesce...\n");
+	prom_printf("Quiescing Open Firmware ...\n");
 	call_prom("quiesce", 0, 0);
 
 	/*
@@ -2910,7 +2910,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
 
 	/* Don't print anything after quiesce under OPAL, it crashes OFW */
 	if (of_platform != PLATFORM_OPAL) {
-		prom_printf("returning from prom_init\n");
+		prom_printf("Booting Linux via __start() ...\n");
 		prom_debug("->dt_header_start=0x%x\n", hdr);
 	}
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-01  9:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12  9:48 [PATCH] powerpc: Reword the "returning from prom_init" message Michael Ellerman
2015-01-12 17:27 ` Paul Clarke
2015-01-13  0:58   ` Michael Ellerman
2015-03-30  6:38 Michael Ellerman
2015-04-01  6:56 ` Jeremy Kerr
2015-04-01  9:32   ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.