diff -uNr linux-2.6.10/arch/x86_64/kernel/io_apic.c linux-2.6.10.new.x86_64/arch/x86_64/kernel/io_apic.c --- linux-2.6.10/arch/x86_64/kernel/io_apic.c 2004-12-24 13:34:45.000000000 -0800 +++ linux-2.6.10.new.x86_64/arch/x86_64/kernel/io_apic.c 2004-12-28 15:46:35.828076192 -0800 @@ -1148,6 +1148,19 @@ unsigned char old_id; unsigned long flags; + unsigned int max_apic; + u32 vendor; + + /* get the max apic */ + vendor = read_pci_config(0, 0x18, 0, PCI_VENDOR_ID); + vendor &= 0xffff; + if(vendor == PCI_VENDOR_ID_AMD) { /* AMD */ + max_apic = (((read_pci_config(0, 0x18, 0, 0x68)>>17) & 3) == 3) ? 0xff : 0xf; + } + else { /* intel: how to find out if intel em64t support 256 apic id? */ + max_apic = 0xf; + } + /* * Set the IOAPIC ID to the value stored in the MPC table. */ @@ -1160,7 +1173,7 @@ old_id = mp_ioapics[apic].mpc_apicid; - if (mp_ioapics[apic].mpc_apicid >= 0xf) { + if (mp_ioapics[apic].mpc_apicid >= max_apic) { apic_printk(APIC_QUIET,KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n", apic, mp_ioapics[apic].mpc_apicid); apic_printk(APIC_QUIET,KERN_ERR "... fixing up to %d. (tell your hw vendor)\n",