Date: Wed, 10 Nov 2004 23:27:18 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 64850 for review Message-ID: <200411102327.iAANRIUk056825@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=64850 Change 64850 by peter@peter_daintree on 2004/11/10 23:26:58 kill cpu_reset_proxy stuff, sched_bind() to cpu0 does it better. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#52 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#52 (text+ko) ==== @@ -80,11 +80,6 @@ #include <amd64/isa/isa.h> static void cpu_reset_real(void); -#ifdef SMP -static void cpu_reset_proxy(void); -static u_int cpu_reset_proxyid; -static volatile u_int cpu_reset_proxy_active; -#endif /* * Finish a fork operation, with process p2 nearly set up. @@ -332,22 +327,6 @@ /* * Force reset the processor by invalidating the entire address space! */ - -#ifdef SMP -static void -cpu_reset_proxy() -{ - - cpu_reset_proxy_active = 1; - while (cpu_reset_proxy_active == 1) - ; /* Wait for other cpu to see that we've started */ - stop_cpus((1<<cpu_reset_proxyid)); - printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); - DELAY(1000000); - cpu_reset_real(); -} -#endif - void cpu_reset() { @@ -368,30 +347,9 @@ stop_cpus(map); /* Stop all other CPUs */ } - if (PCPU_GET(cpuid) == 0) { - DELAY(1000000); - cpu_reset_real(); - /* NOTREACHED */ - } else { - /* We are not BSP (CPU #0) */ - - cpu_reset_proxyid = PCPU_GET(cpuid); - cpustop_restartfunc = cpu_reset_proxy; - cpu_reset_proxy_active = 0; - printf("cpu_reset: Restarting BSP\n"); - started_cpus = (1<<0); /* Restart CPU #0 */ - - cnt = 0; - while (cpu_reset_proxy_active == 0 && cnt < 10000000) - cnt++; /* Wait for BSP to announce restart */ - if (cpu_reset_proxy_active == 0) - printf("cpu_reset: Failed to restart BSP\n"); - enable_intr(); - cpu_reset_proxy_active = 2; - - while (1); - /* NOTREACHED */ - } + DELAY(1000000); + cpu_reset_real(); + /* NOTREACHED */ } #else cpu_reset_real();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411102327.iAANRIUk056825>