x86: use same index for processor maps
authorAlexey Starikovskiy <astarikovskiy@suse.de>
Fri, 21 Mar 2008 17:18:17 +0000 (20:18 +0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:21 +0000 (17:41 +0200)
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/mpparse_32.c

index 15265ee..1b225ce 100644 (file)
@@ -212,7 +212,6 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
                return;
        }
 
-       cpu_set(num_processors, cpu_possible_map);
        num_processors++;
        cpus_complement(tmp_map, cpu_present_map);
        cpu = first_cpu(tmp_map);
@@ -251,12 +250,13 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
                u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
 
                cpu_to_apicid[cpu] = m->mpc_apicid;
-               bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
+               bios_cpu_apicid[cpu] = m->mpc_apicid;
        } else {
                per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid;
                per_cpu(x86_bios_cpu_apicid, cpu) = m->mpc_apicid;
        }
 #endif
+       cpu_set(cpu, cpu_possible_map);
        cpu_set(cpu, cpu_present_map);
 }