All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@linuxpower.ca>
To: James Cleverdon <jamesclv@us.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.19-rc3-ac2 SMP
Date: Thu, 25 Jul 2002 09:11:36 +0200 (SAST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0207250859590.17209-100000@linux-box.realnet.co.sz> (raw)
In-Reply-To: <200207242034.01605.jamesclv@us.ibm.com>

On Wed, 24 Jul 2002, James Cleverdon wrote:

> Ah ha!  Note that while the CPU records in the {MPS,ACPI/MADT} table are in 
> numerical order (as preserved in raw_phys_apicid), the boot CPU is # 02.  The 
> flat code in smp_boot_cpus assumes that the boot CPU will be the first record 
> in the list.  Oops.

Ok i'll give it a whirl, in that case how about the following code to do 
the BSP check in another area too?

Index: linux-2.4.19-rc3-ac2/arch/i386/kernel/smpboot.c
===================================================================
RCS file: /home/zwane/source/cvs_rep/linux-2.4.19-rc3-ac2/arch/i386/kernel/smpboot.c,v
retrieving revision 1.2
diff -u -r1.2 smpboot.c
--- linux-2.4.19-rc3-ac2/arch/i386/kernel/smpboot.c	2002/07/25 06:06:56	1.2
+++ linux-2.4.19-rc3-ac2/arch/i386/kernel/smpboot.c	2002/07/25 06:15:05
@@ -46,6 +46,7 @@
 #include <asm/mtrr.h>
 #include <asm/pgalloc.h>
 #include <asm/smpboot.h>
+#include <asm/msr.h>
 
 /* Set if we find a B stepping CPU			*/
 static int smp_b_stepping;
@@ -229,6 +230,14 @@
 	return res;
 }
 
+int smp_cpu_is_bsp (void)
+{
+	unsigned long l, h;
+	
+	rdmsr(MSR_IA32_APICBASE, l, h);
+	return (l & MSR_IA32_APICBASE_BSP);
+}
+
 static void __init synchronize_tsc_bp (void)
 {
 	int i;
@@ -1067,7 +1076,7 @@
 	connect_bsp_APIC();
 	setup_local_APIC();
 
-	if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_physical_apicid)
+	if (!smp_cpu_is_bsp())
 		BUG();
 
 	/*

-- 
function.linuxpower.ca


  reply	other threads:[~2002-07-25  6:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23  4:21 Summit patch for 2.4.19-rc3-ac2 James Cleverdon
2002-07-23  8:51 ` Lech Szychowski
2002-07-23 12:03 ` 2.4.19-rc3-ac2 SMP Zwane Mwaikambo
2002-07-23 12:11   ` Zwane Mwaikambo
2002-07-23 18:50     ` James Cleverdon
2002-07-24 15:26       ` Zwane Mwaikambo
2002-07-24 22:50         ` James Cleverdon
2002-07-25  3:34         ` James Cleverdon
2002-07-25  7:11           ` Zwane Mwaikambo [this message]
2002-07-25 20:29             ` James Cleverdon
2002-07-25 13:26           ` Zwane Mwaikambo
2002-07-23 13:30 ` Summit patch for 2.4.19-rc3-ac2 James Bourne
2002-07-23 13:42 ` Steven Cole
2002-07-23 14:34 ` Philippe Gramoullé
2002-07-24 17:28 2.4.19-rc3-ac2 SMP Mikael Pettersson
2002-07-25 20:48 ` James Cleverdon
2002-07-26 10:31   ` Zwane Mwaikambo

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=Pine.LNX.4.44.0207250859590.17209-100000@linux-box.realnet.co.sz \
    --to=zwane@linuxpower.ca \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jamesclv@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.