]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/mpparse_64.c
x86: unify arch/x86/kernel/mpparse_64.c
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / mpparse_64.c
index 29d2c40e54a2317716c464665bb041cac01c53fb..5c916383bb71a2030ce20efd9ddf8fec44d86a6c 100644 (file)
@@ -44,38 +44,6 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
 int mp_bus_id_to_pci_bus[MAX_MP_BUSSES] = {[0 ... MAX_MP_BUSSES - 1] = -1 };
 
 static int mp_current_pci_id = 0;
-/* I/O APIC entries */
-struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
-
-/* # of MP IRQ source entries */
-struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
-
-/* MP IRQ source entries */
-int mp_irq_entries;
-
-int nr_ioapics;
-
-#ifdef CONFIG_SMP
-u16 x86_bios_cpu_apicid_init[NR_CPUS] __initdata
-    = {[0 ... NR_CPUS - 1] = BAD_APICID };
-void *x86_bios_cpu_apicid_early_ptr;
-#endif
-DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
-EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
-
-/* Make it easy to share the UP and SMP code: */
-#ifndef CONFIG_X86_SMP
-unsigned int num_processors;
-unsigned disabled_cpus __cpuinitdata;
-#ifndef CONFIG_X86_LOCAL_APIC
-unsigned int boot_cpu_physical_apicid = -1U;
-#endif
-#endif
-
-/* Make it easy to share the UP and SMP code: */
-#ifndef CONFIG_X86_SMP
-physid_mask_t phys_cpu_present_map;
-#endif
 
 /*
  * Intel MP BIOS table parsing routines:
@@ -97,19 +65,25 @@ static int __init mpf_checksum(unsigned char *mp, int len)
 
 static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
 {
+       int apicid;
        char *bootup_cpu = "";
 
        if (!(m->mpc_cpuflag & CPU_ENABLED)) {
                disabled_cpus++;
                return;
        }
+#ifdef CONFIG_X86_NUMAQ
+       apicid = mpc_apic_id(m, translation_table[mpc_record]);
+#else
+       apicid = m->mpc_apicid;
+#endif
        if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
                bootup_cpu = " (Bootup-CPU)";
                boot_cpu_physical_apicid = m->mpc_apicid;
        }
 
        printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu);
-       generic_processor_info(m->mpc_apicid, 0);
+       generic_processor_info(apicid, m->mpc_apicver);
 }
 
 static void __init MP_bus_info(struct mpc_config_bus *m)
@@ -626,33 +600,10 @@ void __init find_smp_config(void)
 
 #ifdef CONFIG_ACPI
 
-void __init mp_register_lapic_address(u64 address)
-{
-       mp_lapic_addr = (unsigned long)address;
-       set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
-       if (boot_cpu_physical_apicid == -1U)
-               boot_cpu_physical_apicid  = GET_APIC_ID(read_apic_id());
-}
-void __cpuinit mp_register_lapic(u8 id, u8 enabled)
-{
-       if (!enabled) {
-               ++disabled_cpus;
-               return;
-       }
-
-       generic_processor_info(id, 0);
-}
-
-
 #define MP_ISA_BUS             0
 #define MP_MAX_IOAPIC_PIN      127
 
-static struct mp_ioapic_routing {
-       int apic_id;
-       int gsi_base;
-       int gsi_end;
-       u32 pin_programmed[4];
-} mp_ioapic_routing[MAX_IO_APICS];
+extern struct mp_ioapic_routing mp_ioapic_routing[MAX_IO_APICS];
 
 static int mp_find_ioapic(int gsi)
 {
@@ -683,7 +634,7 @@ static u8 uniq_ioapic_id(u8 id)
        return find_first_zero_bit(used, 256);
 }
 
-void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
+void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
 {
        int idx = 0;