linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: linux-next: boot panic in serial init
Date: Fri, 24 Jul 2009 17:18:41 +1000	[thread overview]
Message-ID: <20090724171841.b128f8be.sfr@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

Hi Alan,

Today's linux-next on a pSeries PowerPC machine panics during boot like
this:

calling  .serial8250_init+0x0/0x230 @ 1
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
------------[ cut here ]------------
kernel BUG at arch/powerpc/lib/locks.c:36!
cpu 0x0: Vector: 700 (Program Check) at [c0000000be683740]
    pc: c000000000039460: .__spin_yield+0x40/0x90
    lr: c000000000570284: ._spin_lock+0x84/0x90
    sp: c0000000be6839c0
   msr: 8000000000029032
  current = 0xc0000000be67e000
  paca    = 0xc000000000947200
    pid   = 1, comm = swapper
kernel BUG at arch/powerpc/lib/locks.c:36!
enter ? for help
[c0000000be683a30] c000000000570284 ._spin_lock+0x84/0x90
[c0000000be683ab0] c00000000056e75c .__mutex_lock_slowpath+0xec/0x2d0
[c0000000be683b90] c00000000056e274 .mutex_lock+0x54/0x60
[c0000000be683c10] c00000000032f6f8 .uart_add_one_port+0xd8/0x3f0
[c0000000be683d30] c0000000007a48c4 .serial8250_init+0x1a4/0x230
[c0000000be683de0] c00000000000947c .do_one_initcall+0x6c/0x1e0
[c0000000be683ee0] c000000000779d6c .kernel_init+0x23c/0x2c0
[c0000000be683f90] c00000000002a8e4 .kernel_thread+0x54/0x70

arch/powerpc/lib/locks.c line 36 is:

        lock_value = lock->slock;
        if (lock_value == 0)
                return;
        holder_cpu = lock_value & 0xffff;
        BUG_ON(holder_cpu >= NR_CPUS);

this last line.  Which would imply that the lock has probably not been
initialised.  Indeed, uart_add_one_port does:

	struct tty_port *port;

	mutex_lock(&port->mutex);

without assigning to port.  See "serial-move-mutex" from the ttydev tree.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

             reply	other threads:[~2009-07-24  7:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24  7:18 Stephen Rothwell [this message]
2009-07-24 11:05 ` linux-next: boot panic in serial init Sachin Sant
2009-07-24 12:15   ` Alan Cox
2009-07-24 13:11     ` Stephen Rothwell

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=20090724171841.b128f8be.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.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).