]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/i386/kernel/mpparse.c
Merge linux-2.6 with linux-acpi-2.6
[karo-tx-linux.git] / arch / i386 / kernel / mpparse.c
index ce838abb27d8b48ab23d06a191766b0e2f9c7272..cafaeffe381857bd19de265957f9782496063f48 100644 (file)
@@ -65,6 +65,8 @@ int nr_ioapics;
 int pic_mode;
 unsigned long mp_lapic_addr;
 
+unsigned int def_to_bigsmp = 0;
+
 /* Processor that is doing the boot up */
 unsigned int boot_cpu_physical_apicid = -1U;
 /* Internal processor count */
@@ -120,7 +122,7 @@ static int MP_valid_apicid(int apicid, int version)
 
 static void __init MP_processor_info (struct mpc_config_processor *m)
 {
-       int ver, apicid;
+       int ver, apicid, cpu, found_bsp = 0;
        physid_mask_t tmp;
        
        if (!(m->mpc_cpuflag & CPU_ENABLED))
@@ -179,6 +181,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
        if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
                Dprintk("    Bootup CPU\n");
                boot_cpu_physical_apicid = m->mpc_apicid;
+               found_bsp = 1;
        }
 
        if (num_processors >= NR_CPUS) {
@@ -202,6 +205,11 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
                return;
        }
 
+       if (found_bsp)
+               cpu = 0;
+       else
+               cpu = num_processors - 1;
+       cpu_set(cpu, cpu_possible_map);
        tmp = apicid_to_cpu_present(apicid);
        physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp);
        
@@ -213,6 +221,13 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
                ver = 0x10;
        }
        apic_version[m->mpc_apicid] = ver;
+       if ((num_processors > 8) &&
+           APIC_XAPIC(ver) &&
+           (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL))
+               def_to_bigsmp = 1;
+       else
+               def_to_bigsmp = 0;
+
        bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
 }
 
@@ -653,8 +668,6 @@ void __init get_smp_config (void)
        struct intel_mp_floating *mpf = mpf_found;
 
        /*
-        * ACPI may be used to obtain the entire SMP configuration or just to 
-        * enumerate/configure processors (CONFIG_ACPI_BOOT).  Note that 
         * ACPI supports both logical (e.g. Hyper-Threading) and physical 
         * processors, where MPS only supports physical.
         */
@@ -810,7 +823,7 @@ void __init find_smp_config (void)
                             ACPI-based MP Configuration
    -------------------------------------------------------------------------- */
 
-#ifdef CONFIG_ACPI_BOOT
+#ifdef CONFIG_ACPI
 
 void __init mp_register_lapic_address (
        u64                     address)
@@ -856,7 +869,7 @@ void __init mp_register_lapic (
        MP_processor_info(&processor);
 }
 
-#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT))
+#ifdef CONFIG_X86_IO_APIC
 
 #define MP_ISA_BUS             0
 #define MP_MAX_IOAPIC_PIN      127
@@ -1071,11 +1084,9 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
         */
        static int              gsi_to_irq[MAX_GSI_NUM];
 
-#ifdef CONFIG_ACPI_BUS
        /* Don't set up the ACPI SCI because it's already set up */
        if (acpi_fadt.sci_int == gsi)
                return gsi;
-#endif
 
        ioapic = mp_find_ioapic(gsi);
        if (ioapic < 0) {
@@ -1118,13 +1129,11 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
                if (gsi < MAX_GSI_NUM) {
                        if (gsi > 15)
                                gsi = pci_irq++;
-#ifdef CONFIG_ACPI_BUS
                        /*
                         * Don't assign IRQ used by ACPI SCI
                         */
                        if (gsi == acpi_fadt.sci_int)
                                gsi = pci_irq++;
-#endif
                        gsi_to_irq[irq] = gsi;
                } else {
                        printk(KERN_ERR "GSI %u is too high\n", gsi);
@@ -1138,5 +1147,5 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
        return gsi;
 }
 
-#endif /*CONFIG_X86_IO_APIC && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)*/
-#endif /*CONFIG_ACPI_BOOT*/
+#endif /* CONFIG_X86_IO_APIC */
+#endif /* CONFIG_ACPI */