Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Andreas Deresch and committed by
Linus Torvalds
6070f9ec 13a229ab

+12 -4
+4 -2
arch/i386/kernel/io_apic.c
··· 2566 2566 spin_unlock_irqrestore(&ioapic_lock, flags); 2567 2567 2568 2568 /* Sanity check */ 2569 - if (reg_00.bits.ID != apic_id) 2570 - panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic); 2569 + if (reg_00.bits.ID != apic_id) { 2570 + printk("IOAPIC[%d]: Unable to change apic_id!\n", ioapic); 2571 + return -1; 2572 + } 2571 2573 } 2572 2574 2573 2575 apic_printk(APIC_VERBOSE, KERN_INFO
+8 -2
arch/i386/kernel/mpparse.c
··· 915 915 u32 gsi_base) 916 916 { 917 917 int idx = 0; 918 + int tmpid; 918 919 919 920 if (nr_ioapics >= MAX_IO_APICS) { 920 921 printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " ··· 936 935 937 936 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); 938 937 if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) 939 - mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id); 938 + tmpid = io_apic_get_unique_id(idx, id); 940 939 else 941 - mp_ioapics[idx].mpc_apicid = id; 940 + tmpid = id; 941 + if (tmpid == -1) { 942 + nr_ioapics--; 943 + return; 944 + } 945 + mp_ioapics[idx].mpc_apicid = tmpid; 942 946 mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); 943 947 944 948 /*