From owner-p4-projects Fri Nov 22 19:25:55 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 85B8F37B404; Fri, 22 Nov 2002 19:25:52 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 019D037B401 for ; Fri, 22 Nov 2002 19:25:52 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF47043E6E for ; Fri, 22 Nov 2002 19:25:51 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gAN3MZmV013833 for ; Fri, 22 Nov 2002 19:22:35 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gAN3MZcY013830 for perforce@freebsd.org; Fri, 22 Nov 2002 19:22:35 -0800 (PST) Date: Fri, 22 Nov 2002 19:22:35 -0800 (PST) Message-Id: <200211230322.gAN3MZcY013830@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 21393 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=21393 Change 21393 by jhb@jhb_laptop on 2002/11/22 19:21:35 Untested possible fix for P4 SMP problems: Only do one STARTUP IPI to start up AP processors. According to the part of the ia32 vol3 manual I read today, a processor should only be sent one INIT IPI after a hardware reset, and the BIOS does that, not the OS. I'll try and test this on PPro's and Pentium II Xeon's when I get a chance. Affected files ... .. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#28 edit Differences ... ==== //depot/projects/smpng/sys/i386/i386/mp_machdep.c#28 (text+ko) ==== @@ -2141,18 +2141,21 @@ /* used as a watchpoint to signal AP startup */ cpus = mp_ncpus; +#if 0 /* * first we do an INIT/RESET IPI this INIT IPI might be run, reseting * and running the target CPU. OR this INIT IPI might be latched (P5 * bug), CPU waiting for STARTUP IPI. OR this INIT IPI might be * ignored. */ +#endif /* setup the address for the target AP */ icr_hi = lapic.icr_hi & ~APIC_ID_MASK; icr_hi |= (physical_cpu << 24); lapic.icr_hi = icr_hi; +#if 0 /* do an INIT IPI: assert RESET */ icr_lo = lapic.icr_lo & 0xfff00000; lapic.icr_lo = icr_lo | 0x0000c500; @@ -2168,6 +2171,7 @@ u_sleep(10000); /* wait ~10mS */ while (lapic.icr_lo & APIC_DELSTAT_MASK) /* spin */ ; +#endif /* * next we do a STARTUP IPI: the previous INIT IPI might still be @@ -2184,6 +2188,7 @@ /* spin */ ; u_sleep(200); /* wait ~200uS */ +#if 0 /* * finally we do a 2nd STARTUP IPI: this 2nd STARTUP IPI should run IF * the previous STARTUP IPI was cancelled by a latched INIT IPI. OR @@ -2195,6 +2200,7 @@ while (lapic.icr_lo & APIC_DELSTAT_MASK) /* spin */ ; u_sleep(200); /* wait ~200uS */ +#endif /* wait for it to start */ set_apic_timer(5000000);/* == 5 seconds */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message