Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 1999 04:06:12 +0200
From:      Tor.Egge@fast.no
To:        jbryant@unix.tfs.net
Cc:        luoqi@watermarkgroup.com, freebsd-current@FreeBSD.ORG
Subject:   Re: 4-way SMP broken ?
Message-ID:  <199906100206.EAA01848@midten.fast.no>
In-Reply-To: Your message of "Wed, 9 Jun 1999 19:23:34 -0500 (CDT)"
References:  <199906100023.TAA27790@argus.tfs.net>

next in thread | previous in thread | raw e-mail | index | archive | help
----Next_Part(Thu_Jun_10_04:05:47_1999)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


> interesting.  then why the delay in bringing up the AP?  Note in the
> dmesg output below, that the AP only comes up during th SCSI delay.  I
> have also added other comments to the following output.

The APs need the giant kernel lock when initializing the 
local APIC and printing the "launched" message.

I added code for bringing up the APs earlier, but had to disable it,
since it caused some machines to hang.  The APs were probably launched
too early, causing the BSP to attempt to send IPIs before the local
APIC was initialized).

A revised patch for bringing up the APs early is enclosed.

- Tor Egge


----Next_Part(Thu_Jun_10_04:05:47_1999)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Index: mp_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/mp_machdep.c,v
retrieving revision 1.102
diff -u -r1.102 mp_machdep.c
--- mp_machdep.c	1999/06/01 18:19:42	1.102
+++ mp_machdep.c	1999/06/08 00:27:19
@@ -494,6 +494,10 @@
 
 
 #if defined(APIC_IO)
+
+/* Wait for all APs to be fully initialized */
+extern int wait_ap(unsigned int);
+
 /*
  * Final configuration of the BSP's local APIC:
  *  - disable 'pic mode'.
@@ -526,6 +530,9 @@
 
 	if (bootverbose)
 		apic_dump("bsp_apic_configure()");
+	wait_ap(1000000);
+	if (smp_started == 0)
+		printf("WARNING: Failed to start all APs\n");
 }
 #endif  /* APIC_IO */
 
@@ -1743,9 +1750,6 @@
 #endif /* USE_CLOCKLOCK */
 }
 
-
-/* Wait for all APs to be fully initialized */
-extern int wait_ap(unsigned int);
 
 /*
  * start each AP in our list

----Next_Part(Thu_Jun_10_04:05:47_1999)----


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906100206.EAA01848>