diff options
author | Andreas Deresch <aderesch@fs.tum.de> | 2006-02-25 22:18:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-26 12:53:30 -0500 |
commit | 6070f9ec6b03cc46cd0242523326f7a296f47c1c (patch) | |
tree | ba976c8458cfc2429d32883141170bbc4dfd5049 /arch/i386 | |
parent | 13a229abc25640813f1480c0478dfc6bdbc1c19e (diff) |
[PATCH] i386: Handle non existing APICs without panicing
[description from AK]
This fixes booting in APIC mode on some ACER laptops. x86-64
did a similar change some time ago.
See http://bugzilla.kernel.org/show_bug.cgi?id=4700 for details
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/io_apic.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/mpparse.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index f2dd218d88cb..235822b3f41b 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2566,8 +2566,10 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) | |||
2566 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2566 | spin_unlock_irqrestore(&ioapic_lock, flags); |
2567 | 2567 | ||
2568 | /* Sanity check */ | 2568 | /* Sanity check */ |
2569 | if (reg_00.bits.ID != apic_id) | 2569 | if (reg_00.bits.ID != apic_id) { |
2570 | panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic); | 2570 | printk("IOAPIC[%d]: Unable to change apic_id!\n", ioapic); |
2571 | return -1; | ||
2572 | } | ||
2571 | } | 2573 | } |
2572 | 2574 | ||
2573 | apic_printk(APIC_VERBOSE, KERN_INFO | 2575 | apic_printk(APIC_VERBOSE, KERN_INFO |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index e7609abf3796..e6e2f43db85e 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -915,6 +915,7 @@ void __init mp_register_ioapic ( | |||
915 | u32 gsi_base) | 915 | u32 gsi_base) |
916 | { | 916 | { |
917 | int idx = 0; | 917 | int idx = 0; |
918 | int tmpid; | ||
918 | 919 | ||
919 | if (nr_ioapics >= MAX_IO_APICS) { | 920 | if (nr_ioapics >= MAX_IO_APICS) { |
920 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " | 921 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " |
@@ -935,9 +936,14 @@ void __init mp_register_ioapic ( | |||
935 | 936 | ||
936 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); | 937 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); |
937 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) | 938 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) |
938 | mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id); | 939 | tmpid = io_apic_get_unique_id(idx, id); |
939 | else | 940 | else |
940 | mp_ioapics[idx].mpc_apicid = id; | 941 | tmpid = id; |
942 | if (tmpid == -1) { | ||
943 | nr_ioapics--; | ||
944 | return; | ||
945 | } | ||
946 | mp_ioapics[idx].mpc_apicid = tmpid; | ||
941 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); | 947 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); |
942 | 948 | ||
943 | /* | 949 | /* |