mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: LKML <linux-kernel@vger.kernel.org>,
	Paul Burton <paul.burton@imgtec.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thorsten Leemhuis <regressions@leemhuis.info>
Subject: Regression in 4.9-rc1 for PPC32 - bisected to commit 05fd007e4629
Date: Thu, 20 Oct 2016 00:55:10 -0500	[thread overview]
Message-ID: <2ccf74f5-5fa2-2f47-ade1-69addc79c40b@lwfinger.net> (raw)

Kernel 4.9-rc1 fails to boot on my PowerBook G4 Aluminum (32-bit PowerPC) with 
the following splat:

Kernel Panic - not synching: Attempted to kill init: exitcode = 0x00000200

Call trace:

dump_stack+0x24/0x34 (unreliable)
panic+0x110/0x2ac
do_exit+0x464/0x834
do_group_exit+0x84/0xac
__wake_up_parent+0x0/0x34
ret_from_syscall+0x0/0x40

As the panic happens very early, I was not able to capture the output, thus the 
above was entered by hand.

The problem was bisected to commit 05fd007e4629 ("console: don't prefer first 
registered if DT specifies stdout-path"). Examining that patch and testing the 
various hunks, I found that the system booted fine when I eliminated the hunk at

--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2077,6 +2077,8 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
                         name = of_get_property(of_aliases, "stdout", NULL);
                 if (name)
                         of_stdout = of_find_node_opts_by_path(name, 
&of_stdout_options);
+               if (of_stdout)
+                       console_set_by_of();
         }

         if (!of_aliases)

Similarly, it would boot if I eliminated the hunk at

--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2647,7 +2658,7 @@ void register_console(struct console *newcon)
          *      didn't select a console we take the first one
          *      that registers here.
          */
-       if (preferred_console < 0) {
+       if (preferred_console < 0 && !of_specified_console) {
                 if (newcon->index < 0)
                         newcon->index = 0;
                 if (newcon->setup == NULL ||

The problem happens when of_specified_console is true, and the code following 
the modified if statement above is not executed. In my .config, CONFIG_OF=y.

As always, I will be happy to test any fixes.

Thanks,

Larry

-- 
If I was stranded on an island and the only way to get off
the island was to make a pretty UI, I’d die there.

Linus Torvalds

             reply	other threads:[~2016-10-20  5:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  5:55 Larry Finger [this message]
2016-10-22 17:36 ` Larry Finger
2016-10-23 10:48 ` Thorsten Leemhuis
2016-10-24 16:04   ` Larry Finger
2016-10-24 16:29     ` Paul Burton
2016-10-24 19:14       ` Larry Finger
2016-10-25  1:30       ` Larry Finger

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=2ccf74f5-5fa2-2f47-ade1-69addc79c40b@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.burton@imgtec.com \
    --cc=regressions@leemhuis.info \
    /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

all inboxes | Powered by JetHome®