From: Andreas Deresch <aderesch@fs.tum.de>
To: linux-kernel@vger.kernel.org
Subject: panic during IO-APIC detection
Date: Wed, 16 Feb 2005 17:26:22 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.62.0502161701300.10460@Magrathea> (raw)
Hi lkml,
my notebook (Acer Aspire 1691WLMi, chipset: Intel 915PM) hangs during
IO-APIC detection. I am currently using 2.6.11-rc4-bk1, but this should be
the same for other versions.
Reason:
ACPI MADT contains info on 2 IO-APICs.
io_apic_get_unique_id panics due to being unable to assign an id to the
second one (the memory location reads as all ones). The chipset spec
(specifically: ICH6-M) is only talking about one IO-APIC, so most likely the
MADT is in error.
The question is, should io_apic_get_unique_id be more fault tolerant, or
where else should this be fixed?
TIA,
ad
For the moment I did the following:
diff -rbBu linux-2.6.11.orig/arch/i386/kernel/io_apic.c linux-2.6.11/arch/i386/kernel/io_apic.c
--- linux-2.6.11.orig/arch/i386/kernel/io_apic.c 2005-02-15 20:50:11.000000000 +0100
+++ linux-2.6.11/arch/i386/kernel/io_apic.c 2005-02-14 23:49:04.000000000 +0100
@@ -2449,8 +2449,10 @@
spin_unlock_irqrestore(&ioapic_lock, flags);
/* Sanity check */
- if (reg_00.bits.ID != apic_id)
- panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic);
+ if (reg_00.bits.ID != apic_id) {
+ printk("IOAPIC[%d]: Unable change apic_id!\n", ioapic);
+ return -1;
+ }
}
apic_printk(APIC_VERBOSE, KERN_INFO
diff -rbBu linux-2.6.11.orig/arch/i386/kernel/mpparse.c linux-2.6.11/arch/i386/kernel/mpparse.c
--- linux-2.6.11.orig/arch/i386/kernel/mpparse.c 2005-02-15 20:50:11.000000000 +0100
+++ linux-2.6.11/arch/i386/kernel/mpparse.c 2005-02-14 23:49:23.000000000 +0100
@@ -895,6 +895,7 @@
u32 gsi_base)
{
int idx = 0;
+ int tmpid = 0;
if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
@@ -914,7 +915,11 @@
mp_ioapics[idx].mpc_apicaddr = address;
set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
- mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id);
+ if ((tmpid = io_apic_get_unique_id(idx, id)) == -1) {
+ nr_ioapics--;
+ return;
+ }
+ mp_ioapics[idx].mpc_apicid = (u8)(tmpid);
mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
/*
next reply other threads:[~2005-02-15 16:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-16 16:26 Andreas Deresch [this message]
2005-02-15 20:12 ` Andi Kleen
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=Pine.LNX.4.62.0502161701300.10460@Magrathea \
--to=aderesch@fs.tum.de \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®