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.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 7ec031c6ca10..61a63be6b294 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -30,6 +30,7 @@
30#include <asm/pgalloc.h> 30#include <asm/pgalloc.h>
31#include <asm/io_apic.h> 31#include <asm/io_apic.h>
32#include <asm/proto.h> 32#include <asm/proto.h>
33#include <asm/acpi.h>
33 34
34/* Have we found an MP table */ 35/* Have we found an MP table */
35int smp_found_config; 36int smp_found_config;
@@ -107,6 +108,7 @@ static int __init mpf_checksum(unsigned char *mp, int len)
107static void __init MP_processor_info (struct mpc_config_processor *m) 108static void __init MP_processor_info (struct mpc_config_processor *m)
108{ 109{
109 int ver; 110 int ver;
111 static int found_bsp=0;
110 112
111 if (!(m->mpc_cpuflag & CPU_ENABLED)) 113 if (!(m->mpc_cpuflag & CPU_ENABLED))
112 return; 114 return;
@@ -126,11 +128,6 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
126 " Processor ignored.\n", NR_CPUS); 128 " Processor ignored.\n", NR_CPUS);
127 return; 129 return;
128 } 130 }
129 if (num_processors >= maxcpus) {
130 printk(KERN_WARNING "WARNING: maxcpus limit of %i reached."
131 " Processor ignored.\n", maxcpus);
132 return;
133 }
134 131
135 num_processors++; 132 num_processors++;
136 133
@@ -150,7 +147,19 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
150 ver = 0x10; 147 ver = 0x10;
151 } 148 }
152 apic_version[m->mpc_apicid] = ver; 149 apic_version[m->mpc_apicid] = ver;
153 bios_cpu_apicid[num_processors - 1] = m->mpc_apicid; 150 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
151 /*
152 * bios_cpu_apicid is required to have processors listed
153 * in same order as logical cpu numbers. Hence the first
154 * entry is BSP, and so on.
155 */
156 bios_cpu_apicid[0] = m->mpc_apicid;
157 x86_cpu_to_apicid[0] = m->mpc_apicid;
158 found_bsp = 1;
159 } else {
160 bios_cpu_apicid[num_processors - found_bsp] = m->mpc_apicid;
161 x86_cpu_to_apicid[num_processors - found_bsp] = m->mpc_apicid;
162 }
154} 163}
155 164
156static void __init MP_bus_info (struct mpc_config_bus *m) 165static void __init MP_bus_info (struct mpc_config_bus *m)
@@ -759,7 +768,7 @@ void __init mp_register_ioapic (
759 mp_ioapics[idx].mpc_apicaddr = address; 768 mp_ioapics[idx].mpc_apicaddr = address;
760 769
761 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); 770 set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
762 mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id); 771 mp_ioapics[idx].mpc_apicid = id;
763 mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); 772 mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
764 773
765 /* 774 /*