From owner-freebsd-smp@FreeBSD.ORG Thu Aug 28 12:23:05 2003 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 214CC16A4BF for ; Thu, 28 Aug 2003 12:23:05 -0700 (PDT) Received: from mail.speakeasy.net (mail7.speakeasy.net [216.254.0.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A9ED43FE1 for ; Thu, 28 Aug 2003 12:23:03 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 31265 invoked from network); 28 Aug 2003 19:23:02 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 28 Aug 2003 19:23:02 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h7SJN0DH052306; Thu, 28 Aug 2003 15:23:00 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_=XFMail.1.5.4.FreeBSD:20030828124535:861=_" In-Reply-To: <20030828162539.497.qmail@kimchee.ssr.com> Date: Thu, 28 Aug 2003 15:23:25 -0400 (EDT) From: John Baldwin To: Scott Ballantyne X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-smp@freebsd.org Subject: Re: Unpredictable problems with APIC renumbering X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 19:23:05 -0000 This message is in MIME format --_=XFMail.1.5.4.FreeBSD:20030828124535:861=_ Content-Type: text/plain; charset=us-ascii On 28-Aug-2003 Scott Ballantyne wrote: > John Baldwin writes: > >> > Is there a fix or work-a-round for this problem? >> >> It's not a problem you need to worry about and is common to many >> MP motherboards. >> > > It's odd that it only happens occasionally. The precise message is: > > > Programming 24 pins in IOAPIC #0 > IOAPIC #0 intpin 2 -> IRQ 0 > AP#1 (PHY #1) failed! > panic y/n? [y] > mp-lock = 0000001; cpuid=0; 1apicid=0 This is a different message and has nothing to do with the I/O APIC code. Try the attached patch. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ --_=XFMail.1.5.4.FreeBSD:20030828124535:861=_ Content-Disposition: attachment; filename="mp.patch" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; name=mp.patch; SizeOnDisk=862 Index: mp_machdep.c =================================================================== RCS file: /usr/cvs/src/sys/i386/i386/mp_machdep.c,v retrieving revision 1.214 diff -u -r1.214 mp_machdep.c --- mp_machdep.c 12 Aug 2003 17:01:10 -0000 1.214 +++ mp_machdep.c 28 Aug 2003 16:44:51 -0000 @@ -2259,6 +2259,7 @@ int vector; int cpus; u_long icr_lo, icr_hi; + register_t eflags; POSTCODE(START_AP_POST); @@ -2277,6 +2278,7 @@ * bug), CPU waiting for STARTUP IPI. OR this INIT IPI might be * ignored. */ + eflags = intr_disable(); /* setup the address for the target AP */ icr_hi = lapic.icr_hi & ~APIC_ID_MASK; @@ -2332,6 +2334,7 @@ while (lapic.icr_lo & APIC_DELSTAT_MASK) /* spin */ ; u_sleep(200); /* wait ~200uS */ + intr_restore(eflags); /* wait for it to start */ set_apic_timer(5000000);/* == 5 seconds */ --_=XFMail.1.5.4.FreeBSD:20030828124535:861=_-- End of MIME message