Date: Tue, 18 Oct 2005 18:42:12 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 85510 for review Message-ID: <200510181842.j9IIgC80098035@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=85510 Change 85510 by jhb@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510181842.j9IIgC80098035>