diff options
Diffstat (limited to 'arch/i386/kernel/mpparse.c')
| -rw-r--r-- | arch/i386/kernel/mpparse.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index cafaeffe3818..15949fd08109 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
| @@ -122,8 +122,8 @@ static int MP_valid_apicid(int apicid, int version) | |||
| 122 | 122 | ||
| 123 | static void __init MP_processor_info (struct mpc_config_processor *m) | 123 | static void __init MP_processor_info (struct mpc_config_processor *m) |
| 124 | { | 124 | { |
| 125 | int ver, apicid, cpu, found_bsp = 0; | 125 | int ver, apicid; |
| 126 | physid_mask_t tmp; | 126 | physid_mask_t phys_cpu; |
| 127 | 127 | ||
| 128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) | 128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) |
| 129 | return; | 129 | return; |
| @@ -181,7 +181,6 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
| 181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { | 181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { |
| 182 | Dprintk(" Bootup CPU\n"); | 182 | Dprintk(" Bootup CPU\n"); |
| 183 | boot_cpu_physical_apicid = m->mpc_apicid; | 183 | boot_cpu_physical_apicid = m->mpc_apicid; |
| 184 | found_bsp = 1; | ||
| 185 | } | 184 | } |
| 186 | 185 | ||
| 187 | if (num_processors >= NR_CPUS) { | 186 | if (num_processors >= NR_CPUS) { |
| @@ -195,29 +194,26 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
| 195 | " Processor ignored.\n", maxcpus); | 194 | " Processor ignored.\n", maxcpus); |
| 196 | return; | 195 | return; |
| 197 | } | 196 | } |
| 198 | num_processors++; | ||
| 199 | ver = m->mpc_apicver; | 197 | ver = m->mpc_apicver; |
| 200 | 198 | ||
| 201 | if (!MP_valid_apicid(apicid, ver)) { | 199 | if (!MP_valid_apicid(apicid, ver)) { |
| 202 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", | 200 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", |
| 203 | m->mpc_apicid, MAX_APICS); | 201 | m->mpc_apicid, MAX_APICS); |
| 204 | --num_processors; | ||
| 205 | return; | 202 | return; |
| 206 | } | 203 | } |
| 207 | 204 | ||
| 208 | if (found_bsp) | 205 | cpu_set(num_processors, cpu_possible_map); |
| 209 | cpu = 0; | 206 | num_processors++; |
| 210 | else | 207 | phys_cpu = apicid_to_cpu_present(apicid); |
| 211 | cpu = num_processors - 1; | 208 | physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); |
| 212 | cpu_set(cpu, cpu_possible_map); | 209 | |
| 213 | tmp = apicid_to_cpu_present(apicid); | ||
| 214 | physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp); | ||
| 215 | |||
| 216 | /* | 210 | /* |
| 217 | * Validate version | 211 | * Validate version |
| 218 | */ | 212 | */ |
| 219 | if (ver == 0x0) { | 213 | if (ver == 0x0) { |
| 220 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! fixing up to 0x10. (tell your hw vendor)\n", m->mpc_apicid); | 214 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! " |
| 215 | "fixing up to 0x10. (tell your hw vendor)\n", | ||
| 216 | m->mpc_apicid); | ||
| 221 | ver = 0x10; | 217 | ver = 0x10; |
| 222 | } | 218 | } |
| 223 | apic_version[m->mpc_apicid] = ver; | 219 | apic_version[m->mpc_apicid] = ver; |
