From b5cdece0a9f7401448e358779f5931ef7ae0509f Mon Sep 17 00:00:00 2001 From: Steve Passe Date: Fri, 15 Aug 1997 02:34:32 +0000 Subject: [PATCH] The promised "better fix" for "Trap 9 When Boot SMP" problem. We now tsleep() in kthread_init() between start_init() and prepare_usermode() while waiting for ALL the idle_loop() processes to come online. Debugged & tested by: "Thomas D. Dean" Reviewed by: David Greenman --- sys/amd64/include/smp.h | 5 +++-- sys/i386/include/smp.h | 5 +++-- sys/sys/smp.h | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h index 60fc20d39118..a29e6c837bd5 100644 --- a/sys/amd64/include/smp.h +++ b/sys/amd64/include/smp.h @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: smp.h,v 1.23 1997/07/31 05:39:48 fsmp Exp $ + * $Id: smp.h,v 1.20 1997/08/15 02:14:45 smp Exp smp $ * */ @@ -159,8 +159,9 @@ int read_apic_timer __P((void)); void u_sleep __P((int)); /* global data in init_smp.c */ -extern int smp_active; extern int invltlb_ok; +extern int smp_active; +extern volatile int smp_idle_loops; /* 'private' global data in locore.s */ extern volatile u_int cpuid; diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h index 60fc20d39118..a29e6c837bd5 100644 --- a/sys/i386/include/smp.h +++ b/sys/i386/include/smp.h @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: smp.h,v 1.23 1997/07/31 05:39:48 fsmp Exp $ + * $Id: smp.h,v 1.20 1997/08/15 02:14:45 smp Exp smp $ * */ @@ -159,8 +159,9 @@ int read_apic_timer __P((void)); void u_sleep __P((int)); /* global data in init_smp.c */ -extern int smp_active; extern int invltlb_ok; +extern int smp_active; +extern volatile int smp_idle_loops; /* 'private' global data in locore.s */ extern volatile u_int cpuid; diff --git a/sys/sys/smp.h b/sys/sys/smp.h index 60fc20d39118..a29e6c837bd5 100644 --- a/sys/sys/smp.h +++ b/sys/sys/smp.h @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: smp.h,v 1.23 1997/07/31 05:39:48 fsmp Exp $ + * $Id: smp.h,v 1.20 1997/08/15 02:14:45 smp Exp smp $ * */ @@ -159,8 +159,9 @@ int read_apic_timer __P((void)); void u_sleep __P((int)); /* global data in init_smp.c */ -extern int smp_active; extern int invltlb_ok; +extern int smp_active; +extern volatile int smp_idle_loops; /* 'private' global data in locore.s */ extern volatile u_int cpuid;