mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
[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>
This commit is contained in:
parent
13a229abc2
commit
6070f9ec6b
2 changed files with 12 additions and 4 deletions
|
@ -2566,8 +2566,10 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
|
||||||
spin_unlock_irqrestore(&ioapic_lock, flags);
|
spin_unlock_irqrestore(&ioapic_lock, flags);
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if (reg_00.bits.ID != apic_id)
|
if (reg_00.bits.ID != apic_id) {
|
||||||
panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic);
|
printk("IOAPIC[%d]: Unable to change apic_id!\n", ioapic);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apic_printk(APIC_VERBOSE, KERN_INFO
|
apic_printk(APIC_VERBOSE, KERN_INFO
|
||||||
|
|
|
@ -915,6 +915,7 @@ void __init mp_register_ioapic (
|
||||||
u32 gsi_base)
|
u32 gsi_base)
|
||||||
{
|
{
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
int tmpid;
|
||||||
|
|
||||||
if (nr_ioapics >= MAX_IO_APICS) {
|
if (nr_ioapics >= MAX_IO_APICS) {
|
||||||
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
|
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
|
||||||
|
@ -935,9 +936,14 @@ void __init mp_register_ioapic (
|
||||||
|
|
||||||
set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
|
set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
|
||||||
if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15))
|
if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15))
|
||||||
mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id);
|
tmpid = io_apic_get_unique_id(idx, id);
|
||||||
else
|
else
|
||||||
mp_ioapics[idx].mpc_apicid = id;
|
tmpid = id;
|
||||||
|
if (tmpid == -1) {
|
||||||
|
nr_ioapics--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mp_ioapics[idx].mpc_apicid = tmpid;
|
||||||
mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
|
mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue