diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2005-10-30 17:59:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:13 -0500 |
commit | 6c180d94abdcfb77a2fe4275bd03687fa159acd7 (patch) | |
tree | 3254ea7af80edbefc71d9582bdb13867828a8f6d | |
parent | 009b29d90f575a83eba185950a7182ab05e7741a (diff) |
[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: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/mpparse.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 3751bb44961b..8f767d9aa45d 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -182,17 +182,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) | |||
182 | boot_cpu_physical_apicid = m->mpc_apicid; | 182 | boot_cpu_physical_apicid = m->mpc_apicid; |
183 | } | 183 | } |
184 | 184 | ||
185 | if (num_processors >= NR_CPUS) { | ||
186 | printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." | ||
187 | " Processor ignored.\n", NR_CPUS); | ||
188 | return; | ||
189 | } | ||
190 | |||
191 | if (num_processors >= maxcpus) { | ||
192 | printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." | ||
193 | " Processor ignored.\n", maxcpus); | ||
194 | return; | ||
195 | } | ||
196 | ver = m->mpc_apicver; | 185 | ver = m->mpc_apicver; |
197 | 186 | ||
198 | if (!MP_valid_apicid(apicid, ver)) { | 187 | if (!MP_valid_apicid(apicid, ver)) { |
@@ -201,11 +190,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) | |||
201 | return; | 190 | return; |
202 | } | 191 | } |
203 | 192 | ||
204 | cpu_set(num_processors, cpu_possible_map); | ||
205 | num_processors++; | ||
206 | phys_cpu = apicid_to_cpu_present(apicid); | ||
207 | physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); | ||
208 | |||
209 | /* | 193 | /* |
210 | * Validate version | 194 | * Validate version |
211 | */ | 195 | */ |
@@ -216,6 +200,25 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) | |||
216 | ver = 0x10; | 200 | ver = 0x10; |
217 | } | 201 | } |
218 | apic_version[m->mpc_apicid] = ver; | 202 | apic_version[m->mpc_apicid] = ver; |
203 | |||
204 | phys_cpu = apicid_to_cpu_present(apicid); | ||
205 | physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); | ||
206 | |||
207 | if (num_processors >= NR_CPUS) { | ||
208 | printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." | ||
209 | " Processor ignored.\n", NR_CPUS); | ||
210 | return; | ||
211 | } | ||
212 | |||
213 | if (num_processors >= maxcpus) { | ||
214 | printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." | ||
215 | " Processor ignored.\n", maxcpus); | ||
216 | return; | ||
217 | } | ||
218 | |||
219 | cpu_set(num_processors, cpu_possible_map); | ||
220 | num_processors++; | ||
221 | |||
219 | if ((num_processors > 8) && | 222 | if ((num_processors > 8) && |
220 | APIC_XAPIC(ver) && | 223 | APIC_XAPIC(ver) && |
221 | (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) | 224 | (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) |