diff options
Diffstat (limited to 'arch/x86_64/kernel/mpparse.c')
-rw-r--r-- | arch/x86_64/kernel/mpparse.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 9013a90b5c2e..b17cf3eba359 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -106,11 +106,11 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
106 | return sum & 0xFF; | 106 | return sum & 0xFF; |
107 | } | 107 | } |
108 | 108 | ||
109 | static void __init MP_processor_info (struct mpc_config_processor *m) | 109 | static void __cpuinit MP_processor_info (struct mpc_config_processor *m) |
110 | { | 110 | { |
111 | int cpu; | 111 | int cpu; |
112 | unsigned char ver; | 112 | unsigned char ver; |
113 | static int found_bsp=0; | 113 | cpumask_t tmp_map; |
114 | 114 | ||
115 | if (!(m->mpc_cpuflag & CPU_ENABLED)) { | 115 | if (!(m->mpc_cpuflag & CPU_ENABLED)) { |
116 | disabled_cpus++; | 116 | disabled_cpus++; |
@@ -133,8 +133,10 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
133 | return; | 133 | return; |
134 | } | 134 | } |
135 | 135 | ||
136 | cpu = num_processors++; | 136 | num_processors++; |
137 | 137 | cpus_complement(tmp_map, cpu_present_map); | |
138 | cpu = first_cpu(tmp_map); | ||
139 | |||
138 | #if MAX_APICS < 255 | 140 | #if MAX_APICS < 255 |
139 | if ((int)m->mpc_apicid > MAX_APICS) { | 141 | if ((int)m->mpc_apicid > MAX_APICS) { |
140 | printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", | 142 | printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", |
@@ -160,12 +162,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
160 | * entry is BSP, and so on. | 162 | * entry is BSP, and so on. |
161 | */ | 163 | */ |
162 | cpu = 0; | 164 | cpu = 0; |
163 | 165 | } | |
164 | bios_cpu_apicid[0] = m->mpc_apicid; | ||
165 | x86_cpu_to_apicid[0] = m->mpc_apicid; | ||
166 | found_bsp = 1; | ||
167 | } else | ||
168 | cpu = num_processors - found_bsp; | ||
169 | bios_cpu_apicid[cpu] = m->mpc_apicid; | 166 | bios_cpu_apicid[cpu] = m->mpc_apicid; |
170 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | 167 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; |
171 | 168 | ||
@@ -691,7 +688,7 @@ void __init mp_register_lapic_address ( | |||
691 | } | 688 | } |
692 | 689 | ||
693 | 690 | ||
694 | void __init mp_register_lapic ( | 691 | void __cpuinit mp_register_lapic ( |
695 | u8 id, | 692 | u8 id, |
696 | u8 enabled) | 693 | u8 enabled) |
697 | { | 694 | { |