PERFORCE change 85510 for review
John Baldwin
jhb at FreeBSD.org
Tue Oct 18 11:42:14 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=85510
Change 85510 by jhb at jhb_slimer on 2005/10/18 18:41:27
Some cpu reset fixes.
Affected files ...
.. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#89 edit
.. //depot/projects/smpng/sys/i386/i386/vm_machdep.c#73 edit
Differences ...
==== //depot/projects/smpng/sys/i386/i386/mp_machdep.c#89 (text+ko) ====
@@ -1285,6 +1285,7 @@
ipi_nmi_handler()
{
int cpu = PCPU_GET(cpuid);
+ void *restartfunc(void);
if(!(atomic_load_acq_int(&ipi_nmi_pending) & (1 << cpu)))
return 1;
@@ -1304,8 +1305,9 @@
atomic_clear_int(&started_cpus,1 << cpu);
atomic_clear_int(&stopped_cpus,1 << cpu);
- if(cpu == 0 && cpustop_restartfunc != NULL)
- cpustop_restartfunc();
+ restartfunc = (void (*)(void)atomic_readandclear_int(&cpustop_restartfunc);
+ if (restartfunc != NULL)
+ restartfunc();
return 0;
}
==== //depot/projects/smpng/sys/i386/i386/vm_machdep.c#73 (text+ko) ====
@@ -550,7 +550,10 @@
cpustop_restartfunc = cpu_reset_proxy;
cpu_reset_proxy_active = 0;
printf("cpu_reset: Restarting BSP\n");
- started_cpus = (1<<0); /* Restart CPU #0 */
+
+ /* Restart CPU #0. */
+ /* XXX: restart_cpus(1 << 0); */
+ atomic_store_rel_int(&started_cpus, (1 << 0));
cnt = 0;
while (cpu_reset_proxy_active == 0 && cnt < 10000000)
More information about the p4-projects
mailing list