Commit 6c180d94 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds

[PATCH] i386 mpparse: Only ignore lapic information we can't store

After staring at mpparse.c for a little longer I noticed that when we hit
our limit of num_processors we are filtering out information about other
processors that we can still store.

This patch just reorders the code so we store everything we can.

This should avoid the incorrect warning about our boot CPU not being listed
by the BIOS that we are now getting in the kexec on panic case, and it
should allow us to detect all apicid conflicts even when our physical
number of cpus exceeds maxcpus.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 009b29d9
...@@ -182,17 +182,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) ...@@ -182,17 +182,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m)
boot_cpu_physical_apicid = m->mpc_apicid; boot_cpu_physical_apicid = m->mpc_apicid;
} }
if (num_processors >= NR_CPUS) {
printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached."
" Processor ignored.\n", NR_CPUS);
return;
}
if (num_processors >= maxcpus) {
printk(KERN_WARNING "WARNING: maxcpus limit of %i reached."
" Processor ignored.\n", maxcpus);
return;
}
ver = m->mpc_apicver; ver = m->mpc_apicver;
if (!MP_valid_apicid(apicid, ver)) { if (!MP_valid_apicid(apicid, ver)) {
...@@ -201,11 +190,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) ...@@ -201,11 +190,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m)
return; return;
} }
cpu_set(num_processors, cpu_possible_map);
num_processors++;
phys_cpu = apicid_to_cpu_present(apicid);
physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu);
/* /*
* Validate version * Validate version
*/ */
...@@ -216,6 +200,25 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) ...@@ -216,6 +200,25 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m)
ver = 0x10; ver = 0x10;
} }
apic_version[m->mpc_apicid] = ver; apic_version[m->mpc_apicid] = ver;
phys_cpu = apicid_to_cpu_present(apicid);
physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu);
if (num_processors >= NR_CPUS) {
printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached."
" Processor ignored.\n", NR_CPUS);
return;
}
if (num_processors >= maxcpus) {
printk(KERN_WARNING "WARNING: maxcpus limit of %i reached."
" Processor ignored.\n", maxcpus);
return;
}
cpu_set(num_processors, cpu_possible_map);
num_processors++;
if ((num_processors > 8) && if ((num_processors > 8) &&
APIC_XAPIC(ver) && APIC_XAPIC(ver) &&
(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment