diff options
Diffstat (limited to 'arch/x86_64/kernel/mpparse.c')
-rw-r--r-- | arch/x86_64/kernel/mpparse.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 7ec031c6ca10..f86d9db94bfc 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -107,6 +107,7 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
107 | static void __init MP_processor_info (struct mpc_config_processor *m) | 107 | static void __init MP_processor_info (struct mpc_config_processor *m) |
108 | { | 108 | { |
109 | int ver; | 109 | int ver; |
110 | static int found_bsp=0; | ||
110 | 111 | ||
111 | if (!(m->mpc_cpuflag & CPU_ENABLED)) | 112 | if (!(m->mpc_cpuflag & CPU_ENABLED)) |
112 | return; | 113 | return; |
@@ -126,11 +127,6 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
126 | " Processor ignored.\n", NR_CPUS); | 127 | " Processor ignored.\n", NR_CPUS); |
127 | return; | 128 | return; |
128 | } | 129 | } |
129 | if (num_processors >= maxcpus) { | ||
130 | printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." | ||
131 | " Processor ignored.\n", maxcpus); | ||
132 | return; | ||
133 | } | ||
134 | 130 | ||
135 | num_processors++; | 131 | num_processors++; |
136 | 132 | ||
@@ -150,7 +146,19 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
150 | ver = 0x10; | 146 | ver = 0x10; |
151 | } | 147 | } |
152 | apic_version[m->mpc_apicid] = ver; | 148 | apic_version[m->mpc_apicid] = ver; |
153 | bios_cpu_apicid[num_processors - 1] = m->mpc_apicid; | 149 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { |
150 | /* | ||
151 | * bios_cpu_apicid is required to have processors listed | ||
152 | * in same order as logical cpu numbers. Hence the first | ||
153 | * entry is BSP, and so on. | ||
154 | */ | ||
155 | bios_cpu_apicid[0] = m->mpc_apicid; | ||
156 | x86_cpu_to_apicid[0] = m->mpc_apicid; | ||
157 | found_bsp = 1; | ||
158 | } else { | ||
159 | bios_cpu_apicid[num_processors - found_bsp] = m->mpc_apicid; | ||
160 | x86_cpu_to_apicid[num_processors - found_bsp] = m->mpc_apicid; | ||
161 | } | ||
154 | } | 162 | } |
155 | 163 | ||
156 | static void __init MP_bus_info (struct mpc_config_bus *m) | 164 | static void __init MP_bus_info (struct mpc_config_bus *m) |
@@ -759,7 +767,7 @@ void __init mp_register_ioapic ( | |||
759 | mp_ioapics[idx].mpc_apicaddr = address; | 767 | mp_ioapics[idx].mpc_apicaddr = address; |
760 | 768 | ||
761 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); | 769 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); |
762 | mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id); | 770 | mp_ioapics[idx].mpc_apicid = id; |
763 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); | 771 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); |
764 | 772 | ||
765 | /* | 773 | /* |