--- linux-2.6.8-rc2/arch/i386/kernel/setup.c.org 2004-08-06 12:48:07.000000000 -0700 +++ linux-2.6.8-rc2/arch/i386/kernel/setup.c 2004-08-06 13:16:20.000000000 -0700 @@ -51,6 +51,12 @@ #include "setup_arch_pre.h" #include +#ifdef CONFIG_X86_LOCAL_APIC +#include +#include +#endif /* CONFIG_X86_LOCAL_APIC */ + + /* This value is set up by the early boot code to point to the value immediately after the boot time page tables. It contains a *physical* address, and must not be in the .bss segment! */ @@ -1370,12 +1376,8 @@ void __init setup_arch(char **cmdline_p) } #endif - dmi_scan_machine(); -#ifdef CONFIG_X86_GENERICARCH - generic_apic_probe(*cmdline_p); -#endif if (efi_enabled) efi_map_memmap(); @@ -1389,6 +1391,14 @@ void __init setup_arch(char **cmdline_p) get_smp_config(); #endif +#ifdef CONFIG_X86_GENERICARCH + generic_apic_probe(*cmdline_p); +#endif + +#ifdef CONFIG_X86_LOCAL_APIC + clustered_apic_check(); +#endif + register_memory(max_low_pfn); #ifdef CONFIG_VT --- linux-2.6.8-rc2/arch/i386/kernel/mpparse.c.org 2004-08-06 11:05:36.000000000 -0700 +++ linux-2.6.8-rc2/arch/i386/kernel/mpparse.c 2004-08-06 13:01:18.000000000 -0700 @@ -65,6 +65,9 @@ int nr_ioapics; int pic_mode; unsigned long mp_lapic_addr; +unsigned long def_to_bigsmp = 0; +static unsigned long xapic_support = 1; + /* Processor that is doing the boot up */ unsigned int boot_cpu_physical_apicid = -1U; unsigned int boot_cpu_logical_apicid = -1U; @@ -215,6 +218,14 @@ void __init MP_processor_info (struct mp ver = 0x10; } apic_version[m->mpc_apicid] = ver; + if (!APIC_XAPIC(ver)) + xapic_support = 0; + + if ((num_processors > 8) && xapic_support) + def_to_bigsmp = 1; + else + def_to_bigsmp = 0; + bios_cpu_apicid[num_processors - 1] = m->mpc_apicid; } @@ -481,7 +492,6 @@ static int __init smp_read_mpc(struct mp } ++mpc_record; } - clustered_apic_check(); if (!num_processors) printk(KERN_ERR "SMP mptable: no processors registered!\n"); return num_processors; --- linux-2.6.8-rc2/arch/i386/kernel/acpi/boot.c.org 2004-08-06 13:02:15.000000000 -0700 +++ linux-2.6.8-rc2/arch/i386/kernel/acpi/boot.c 2004-08-06 13:02:23.000000000 -0700 @@ -40,7 +40,6 @@ #ifdef CONFIG_X86_64 static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { } -static inline void clustered_apic_check(void) { } static inline int ioapic_setup_disabled(void) { return 0; } #include @@ -766,7 +765,6 @@ acpi_process_madt(void) acpi_ioapic = 1; smp_found_config = 1; - clustered_apic_check(); } } if (error == -EINVAL) { --- linux-2.6.8-rc2/include/asm-i386/mpspec.h.org 2004-08-06 11:32:26.000000000 -0700 +++ linux-2.6.8-rc2/include/asm-i386/mpspec.h 2004-08-06 11:33:08.000000000 -0700 @@ -11,6 +11,7 @@ extern int mp_bus_id_to_local [MAX_MP_BU extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; +extern unsigned long def_to_bigsmp; extern unsigned int boot_cpu_physical_apicid; extern int smp_found_config; extern void find_smp_config (void); --- linux-2.6.8-rc2/include/asm-i386/apicdef.h.org 2004-08-06 11:14:39.000000000 -0700 +++ linux-2.6.8-rc2/include/asm-i386/apicdef.h 2004-08-06 11:19:16.000000000 -0700 @@ -16,6 +16,7 @@ #define GET_APIC_VERSION(x) ((x)&0xFF) #define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF) #define APIC_INTEGRATED(x) ((x)&0xF0) +#define APIC_XAPIC(x) ((x)&0x14) #define APIC_TASKPRI 0x80 #define APIC_TPRI_MASK 0xFF #define APIC_ARBPRI 0x90 --- linux-2.6.8-rc2/arch/i386/mach-generic/probe.c.org 2004-08-06 11:33:53.000000000 -0700 +++ linux-2.6.8-rc2/arch/i386/mach-generic/probe.c 2004-08-06 12:38:45.000000000 -0700 @@ -26,7 +26,8 @@ struct genapic *apic_probe[] __initdata &apic_summit, &apic_bigsmp, &apic_es7000, - &apic_default, /* must be last */ + &apic_default, + &apic_bigsmp, NULL, }; --- linux-2.6.8-rc2/arch/i386/mach-generic/default.c.org 2004-08-06 11:34:21.000000000 -0700 +++ linux-2.6.8-rc2/arch/i386/mach-generic/default.c 2004-08-06 13:09:29.000000000 -0700 @@ -18,9 +18,14 @@ #include #include -/* should be called last. */ +extern int dmi_bigsmp; + static __init int probe_default(void) { + if (def_to_bigsmp) { + dmi_bigsmp = 1; + return 0; + } return 1; }