aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/mpparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/mpparse.c')
-rw-r--r--arch/x86_64/kernel/mpparse.c52
1 files changed, 17 insertions, 35 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index d63f849aea2c..32b6977f80c0 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -41,7 +41,6 @@ int acpi_found_madt;
41 * Various Linux-internal data structures created from the 41 * Various Linux-internal data structures created from the
42 * MP-table. 42 * MP-table.
43 */ 43 */
44unsigned char apic_version [MAX_APICS];
45DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); 44DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
46int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; 45int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 };
47 46
@@ -94,24 +93,21 @@ static int __init mpf_checksum(unsigned char *mp, int len)
94static void __cpuinit MP_processor_info (struct mpc_config_processor *m) 93static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
95{ 94{
96 int cpu; 95 int cpu;
97 unsigned char ver;
98 cpumask_t tmp_map; 96 cpumask_t tmp_map;
97 char *bootup_cpu = "";
99 98
100 if (!(m->mpc_cpuflag & CPU_ENABLED)) { 99 if (!(m->mpc_cpuflag & CPU_ENABLED)) {
101 disabled_cpus++; 100 disabled_cpus++;
102 return; 101 return;
103 } 102 }
104 103
105 printk(KERN_INFO "Processor #%d %d:%d APIC version %d\n",
106 m->mpc_apicid,
107 (m->mpc_cpufeature & CPU_FAMILY_MASK)>>8,
108 (m->mpc_cpufeature & CPU_MODEL_MASK)>>4,
109 m->mpc_apicver);
110
111 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { 104 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
112 Dprintk(" Bootup CPU\n"); 105 bootup_cpu = " (Bootup-CPU)";
113 boot_cpu_id = m->mpc_apicid; 106 boot_cpu_id = m->mpc_apicid;
114 } 107 }
108
109 printk(KERN_INFO "Processor #%d%s\n", m->mpc_apicid, bootup_cpu);
110
115 if (num_processors >= NR_CPUS) { 111 if (num_processors >= NR_CPUS) {
116 printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." 112 printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached."
117 " Processor ignored.\n", NR_CPUS); 113 " Processor ignored.\n", NR_CPUS);
@@ -129,17 +125,7 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
129 return; 125 return;
130 } 126 }
131#endif 127#endif
132 ver = m->mpc_apicver;
133
134 physid_set(m->mpc_apicid, phys_cpu_present_map); 128 physid_set(m->mpc_apicid, phys_cpu_present_map);
135 /*
136 * Validate version
137 */
138 if (ver == 0x0) {
139 printk(KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! fixing up to 0x10. (tell your hw vendor)\n", m->mpc_apicid);
140 ver = 0x10;
141 }
142 apic_version[m->mpc_apicid] = ver;
143 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { 129 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
144 /* 130 /*
145 * bios_cpu_apicid is required to have processors listed 131 * bios_cpu_apicid is required to have processors listed
@@ -179,8 +165,8 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m)
179 if (!(m->mpc_flags & MPC_APIC_USABLE)) 165 if (!(m->mpc_flags & MPC_APIC_USABLE))
180 return; 166 return;
181 167
182 printk("I/O APIC #%d Version %d at 0x%X.\n", 168 printk("I/O APIC #%d at 0x%X.\n",
183 m->mpc_apicid, m->mpc_apicver, m->mpc_apicaddr); 169 m->mpc_apicid, m->mpc_apicaddr);
184 if (nr_ioapics >= MAX_IO_APICS) { 170 if (nr_ioapics >= MAX_IO_APICS) {
185 printk(KERN_ERR "Max # of I/O APICs (%d) exceeded (found %d).\n", 171 printk(KERN_ERR "Max # of I/O APICs (%d) exceeded (found %d).\n",
186 MAX_IO_APICS, nr_ioapics); 172 MAX_IO_APICS, nr_ioapics);
@@ -413,13 +399,10 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
413 * 2 CPUs, numbered 0 & 1. 399 * 2 CPUs, numbered 0 & 1.
414 */ 400 */
415 processor.mpc_type = MP_PROCESSOR; 401 processor.mpc_type = MP_PROCESSOR;
416 /* Either an integrated APIC or a discrete 82489DX. */ 402 processor.mpc_apicver = 0;
417 processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
418 processor.mpc_cpuflag = CPU_ENABLED; 403 processor.mpc_cpuflag = CPU_ENABLED;
419 processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | 404 processor.mpc_cpufeature = 0;
420 (boot_cpu_data.x86_model << 4) | 405 processor.mpc_featureflag = 0;
421 boot_cpu_data.x86_mask;
422 processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
423 processor.mpc_reserved[0] = 0; 406 processor.mpc_reserved[0] = 0;
424 processor.mpc_reserved[1] = 0; 407 processor.mpc_reserved[1] = 0;
425 for (i = 0; i < 2; i++) { 408 for (i = 0; i < 2; i++) {
@@ -448,7 +431,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)
448 431
449 ioapic.mpc_type = MP_IOAPIC; 432 ioapic.mpc_type = MP_IOAPIC;
450 ioapic.mpc_apicid = 2; 433 ioapic.mpc_apicid = 2;
451 ioapic.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01; 434 ioapic.mpc_apicver = 0;
452 ioapic.mpc_flags = MPC_APIC_USABLE; 435 ioapic.mpc_flags = MPC_APIC_USABLE;
453 ioapic.mpc_apicaddr = 0xFEC00000; 436 ioapic.mpc_apicaddr = 0xFEC00000;
454 MP_ioapic_info(&ioapic); 437 MP_ioapic_info(&ioapic);
@@ -640,12 +623,11 @@ void __cpuinit mp_register_lapic (u8 id, u8 enabled)
640 623
641 processor.mpc_type = MP_PROCESSOR; 624 processor.mpc_type = MP_PROCESSOR;
642 processor.mpc_apicid = id; 625 processor.mpc_apicid = id;
643 processor.mpc_apicver = GET_APIC_VERSION(apic_read(APIC_LVR)); 626 processor.mpc_apicver = 0;
644 processor.mpc_cpuflag = (enabled ? CPU_ENABLED : 0); 627 processor.mpc_cpuflag = (enabled ? CPU_ENABLED : 0);
645 processor.mpc_cpuflag |= (boot_cpu ? CPU_BOOTPROCESSOR : 0); 628 processor.mpc_cpuflag |= (boot_cpu ? CPU_BOOTPROCESSOR : 0);
646 processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | 629 processor.mpc_cpufeature = 0;
647 (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; 630 processor.mpc_featureflag = 0;
648 processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
649 processor.mpc_reserved[0] = 0; 631 processor.mpc_reserved[0] = 0;
650 processor.mpc_reserved[1] = 0; 632 processor.mpc_reserved[1] = 0;
651 633
@@ -700,7 +682,7 @@ void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
700 682
701 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); 683 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
702 mp_ioapics[idx].mpc_apicid = id; 684 mp_ioapics[idx].mpc_apicid = id;
703 mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); 685 mp_ioapics[idx].mpc_apicver = 0;
704 686
705 /* 687 /*
706 * Build basic IRQ lookup table to facilitate gsi->io_apic lookups 688 * Build basic IRQ lookup table to facilitate gsi->io_apic lookups
@@ -711,9 +693,9 @@ void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
711 mp_ioapic_routing[idx].gsi_end = gsi_base + 693 mp_ioapic_routing[idx].gsi_end = gsi_base +
712 io_apic_get_redir_entries(idx); 694 io_apic_get_redir_entries(idx);
713 695
714 printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " 696 printk(KERN_INFO "IOAPIC[%d]: apic_id %d, address 0x%x, "
715 "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, 697 "GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid,
716 mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, 698 mp_ioapics[idx].mpc_apicaddr,
717 mp_ioapic_routing[idx].gsi_start, 699 mp_ioapic_routing[idx].gsi_start,
718 mp_ioapic_routing[idx].gsi_end); 700 mp_ioapic_routing[idx].gsi_end);
719} 701}