> Hello,
> 
> on a 5.0-current i386-SMP system of today I am still getting on about
> every second reboot the message:
> 
> boot() called on cpu #1
> W

Try applying the enclosed patch.

- Tor Egge


Index: vm_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/vm_machdep.c,v
retrieving revision 1.169
diff -u -r1.169 vm_machdep.c
--- vm_machdep.c        4 Sep 2001 08:36:46 -0000       1.169
+++ vm_machdep.c        4 Sep 2001 19:58:38 -0000
@@ -424,8 +433,13 @@
 {
 
        cpu_reset_proxy_active = 1;
+       wbinvd();
        while (cpu_reset_proxy_active == 1)
                ;        /* Wait for other cpu to see that we've started */
+       cpu_reset_proxy_active = 3;
+       wbinvd();
+       while (cpu_reset_proxy_active == 3)
+               ;  /* Wait for other cpu to enable interrupts */
        stop_cpus((1<<cpu_reset_proxyid));
        printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid);
        DELAY(1000000);
@@ -463,6 +477,7 @@
                        cpu_reset_proxyid = PCPU_GET(cpuid);
                        cpustop_restartfunc = cpu_reset_proxy;
                        cpu_reset_proxy_active = 0;
+                       wbinvd();
                        printf("cpu_reset: Restarting BSP\n");
                        started_cpus = (1<<0);          /* Restart CPU #0 */
 
@@ -471,9 +486,19 @@
                                cnt++;  /* Wait for BSP to announce restart */
                        if (cpu_reset_proxy_active == 0)
                                printf("cpu_reset: Failed to restart BSP\n");
-                       enable_intr();
+                       disable_intr();
                        cpu_reset_proxy_active = 2;
-
+                       wbinvd();
+                       cnt = 0;
+                       while (cpu_reset_proxy_active == 2 && cnt < 10000000)
+                               cnt++;  /* Wait for BSP to stop APs */
+                       if (cpu_reset_proxy_active == 2) {
+                               printf("cpu_reset: BSP did not stop APs\n");
+                               cpu_reset_real();
+                       }
+                       cpu_reset_proxy_active = 4;
+                       wbinvd();
+                       enable_intr();
                        while (1);
                        /* NOTREACHED */
                }

Reply via email to