From owner-freebsd-smp Mon Sep 7 13:31:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA00541 for freebsd-smp-outgoing; Mon, 7 Sep 1998 13:31:56 -0700 (PDT) (envelope-from owner-freebsd-smp@FreeBSD.ORG) Received: from midten.fast.no (midten.fast.no [195.139.251.11]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA00531 for ; Mon, 7 Sep 1998 13:31:50 -0700 (PDT) (envelope-from tegge@fast.no) Received: from fast.no (IDENT:tegge@midten.fast.no [195.139.251.11]) by midten.fast.no (8.9.1/8.9.1) with ESMTP id WAA18283; Mon, 7 Sep 1998 22:31:21 +0200 (CEST) Message-Id: <199809072031.WAA18283@midten.fast.no> To: bgrayson@marvin.ece.utexas.edu Cc: freebsd-smp@FreeBSD.ORG Subject: Re: apic_ipi stuck problems From: Tor.Egge@fast.no In-Reply-To: Your message of "Mon, 7 Sep 1998 13:52:42 -0500" References: <19980907135242.A1480@marvin.ece.utexas.edu> X-Mailer: Mew version 1.70 on Emacs 19.34.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 07 Sep 1998 22:31:21 +0200 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I've installed 3.0-19980804-SNAP on a quad PPro box, and > occasionally had reboot problems where I would get a message > like ``apic_ipi stuck. Rebooting within 15 seconds.'' at which > point it reboots and gets to exactly the same thing. Usually, > a hard reboot will bring it back to its senses. > > Yesterday when I tried to bring the machine up (it was shut > down before a planned AC outage), for four consecutive reboots > it went into this mode. At that point I gave up and left it > powered off. Is this a software bug, and if so is it fixed in > -current? Unfortunately, I'm pretty pressed for time for the > next week or two, so I may not be able to try out anything that > requires a significant amount of time, but if there's a quick fix > I'd probably be able to try it out. There is a quick fix (already committed to -current). diff -ru ../OLD1/usr/src/sys/i386/i386/mp_machdep.c sys/i386/i386/mp_machdep.c --- ../OLD1/usr/src/sys/i386/i386/mp_machdep.c Sat Sep 5 21:23:28 1998 +++ sys/i386/i386/mp_machdep.c Sun Sep 6 21:19:19 1998 @@ -314,7 +316,7 @@ struct pcb stoppcbs[NCPU]; -static int smp_started; /* has the system started? */ +int smp_started; /* has the system started? */ /* * Local data and functions. @@ -2123,9 +2217,11 @@ * quite correct yet. We should have a bitfield for cpus willing * to accept TLB flush IPI's or something and sync them. */ - invltlb_ok = 1; - smp_started = 1; /* enable IPI's, tlb shootdown, freezes etc */ - smp_active = 1; /* historic */ + if (smp_cpus == mp_ncpus) { + invltlb_ok = 1; + smp_started = 1; /* enable IPI's, tlb shootdown, freezes etc */ + smp_active = 1; /* historic */ + } curproc = NULL; /* make sure */ } diff -ru ../OLD1/usr/src/sys/i386/i386/mpboot.s sys/i386/i386/mpboot.s --- ../OLD1/usr/src/sys/i386/i386/mpboot.s Sat Sep 5 21:22:52 1998 +++ sys/i386/i386/mpboot.s Sun Sep 6 21:22:03 1998 @@ -124,6 +124,12 @@ /* Now, let's prepare for some REAL WORK :-) */ call _ap_init + call _rel_mplock +2: + cmpl $0, CNAME(smp_started) /* Wait for last AP to be ready */ + jz 2b + call _get_mplock + /* let her rip! (loads new stack) */ jmp _cpu_switch - Tor Egge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message