public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: Re: ACPI: Uninitialized spinlocks & Unable to dump stack
Date: Wed, 01 Aug 2007 12:18:44 +0000	[thread overview]
Message-ID: <1185970724.8731.11.camel@kane-linux> (raw)
In-Reply-To: <Pine.LNX.4.64.0707312246390.14878@schroedinger.engr.sgi.com>

2007-07-31 (火) の 22:48 -0700 に Christoph Lameter さんは書きました:
> With todays git I get (sn2_defconfig w/ spinlock debuggin):

(snip.)

> ACPI: Error parsing MADT - no IOSAPIC entries
> register_intr: No IOSAPIC for GSI 52
> BUG: spinlock bad magic on CPU#0, swapper/0
>  lock: a000000100bf66d0, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 
> 0
> unwind: cannot stack reg state!
> 
> Call Trace:
>  [<a000000100013900>] show_stack+0x40/0xa0

(snip.)

Hi,

I don't know why no IOSAPIC entries was found on your system.
But I think the cause of this stack trace is a bug in the code
path of interrupt registering failure. Here is a patch to fix
this bug. Could you try that?

Thanks,
Kenji Kaneshige

---

Fix wrong access to irq_desc[] in iosapic_register_intr().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

---
 arch/ia64/kernel/iosapic.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.23-rc1/arch/ia64/kernel/iosapic.c
=================================--- linux-2.6.23-rc1.orig/arch/ia64/kernel/iosapic.c
+++ linux-2.6.23-rc1/arch/ia64/kernel/iosapic.c
@@ -794,8 +794,9 @@ iosapic_register_intr (unsigned int gsi,
 	err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY,
 			    polarity, trigger);
 	if (err < 0) {
+		spin_unlock(&irq_desc[irq].lock);
 		irq = err;
-		goto unlock_all;
+		goto unlock_iosapic_lock;
 	}
 
 	/*
@@ -811,7 +812,7 @@ iosapic_register_intr (unsigned int gsi,
 	       gsi, (trigger = IOSAPIC_EDGE ? "edge" : "level"),
 	       (polarity = IOSAPIC_POL_HIGH ? "high" : "low"),
 	       cpu_logical_id(dest), dest, irq_to_vector(irq));
- unlock_all:
+
 	spin_unlock(&irq_desc[irq].lock);
  unlock_iosapic_lock:
 	spin_unlock_irqrestore(&iosapic_lock, flags);



  reply	other threads:[~2007-08-01 12:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01  5:48 ACPI: Uninitialized spinlocks & Unable to dump stack Christoph Lameter
2007-08-01 12:18 ` Kenji Kaneshige [this message]
2007-08-01 13:33 ` Jes Sorensen
2007-08-01 16:00 ` Russ Anderson
2007-08-01 20:02 ` Christoph Lameter
2007-08-01 20:34 ` Russ Anderson
2007-08-02  1:06 ` Keith Rich
2007-08-02  1:37 ` Keith Rich

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=1185970724.8731.11.camel@kane-linux \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-ia64@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