mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: vgoyal@in.ibm.com
Cc: Andrew Morton <akpm@osdl.org>,
	fastboot@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] i386 mpparse: Only ignore lapic information we can't store
Date: Tue, 25 Oct 2005 01:47:08 -0600	[thread overview]
Message-ID: <m1irvmca2r.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20051024130311.GA5853@in.ibm.com> (Vivek Goyal's message of "Mon, 24 Oct 2005 18:33:11 +0530")


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>


---

 arch/i386/kernel/mpparse.c |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 deletions(-)

applies-to: cf16f96fe9347e42dd2fc6b305005a52783195d4
192f11c9442be11c6535b38d371aa3771fd9513e
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index 27aabfc..07555a4 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -182,17 +182,6 @@ static void __init MP_processor_info (st
 		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;
 
 	if (!MP_valid_apicid(apicid, ver)) {
@@ -201,11 +190,6 @@ static void __init MP_processor_info (st
 		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
 	 */
@@ -216,6 +200,25 @@ static void __init MP_processor_info (st
 		ver = 0x10;
 	}
 	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) &&
 	    APIC_XAPIC(ver) &&
 	    (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL))

  parent reply	other threads:[~2005-10-25  7:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04 15:04 [PATCH] i386: move apic init in init_IRQs Eric W. Biederman
2005-10-04 15:34 ` Maciej W. Rozycki
2005-10-04 15:48   ` Eric W. Biederman
2005-10-04 17:16     ` Maciej W. Rozycki
2005-10-05 18:30       ` [PATCH] i386 apic: Fix mispelling of APIC Eric W. Biederman
2005-10-21 13:33 ` [Fastboot] [PATCH] i386: move apic init in init_IRQs Vivek Goyal
2005-10-21 14:45   ` Eric W. Biederman
2005-10-21 16:53     ` Albert Herranz
2005-10-21 18:01       ` Eric W. Biederman
2005-10-22 14:52     ` Vivek Goyal
2005-10-22 15:23       ` Eric W. Biederman
2005-10-24 13:03         ` Vivek Goyal
2005-10-24 15:36           ` Eric W. Biederman
2005-10-25  7:17           ` Eric W. Biederman
2005-10-25  7:47           ` Eric W. Biederman [this message]
2005-10-25  9:42             ` [PATCH] i386 mpparse: Only ignore lapic information we can't store Vivek Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1irvmca2r.fsf_-_@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@osdl.org \
    --cc=fastboot@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vgoyal@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome