Revert a part of the previous commits to these files that made the NMI

IPI_STOP handling code use atomic_readandclear() to execute the restart
function on the first CPU to resume and restore the behavior of always
executing the restart function on the BSP since this is in fact what the
non-NMI IPI_STOP handler does.  I did add back in a statement to clear
the restart function pointer after it is executed to match the behavior
of the non-NMI IPI_STOP handler.
This commit is contained in:
John Baldwin 2005-11-16 20:58:40 +00:00
parent 1c570dff3d
commit db477d6cc8
2 changed files with 8 additions and 10 deletions

View File

@ -1072,7 +1072,6 @@ ipi_nmi_handler()
{
int cpu = PCPU_GET(cpuid);
int cpumask = PCPU_GET(cpumask);
void (*restartfunc)(void);
if (!(ipi_nmi_pending & cpumask))
return 1;
@ -1091,10 +1090,10 @@ ipi_nmi_handler()
atomic_clear_int(&started_cpus, cpumask);
atomic_clear_int(&stopped_cpus, cpumask);
restartfunc = (void (*)(void))atomic_readandclear_long(
(u_long *)&cpustop_restartfunc);
if (restartfunc != NULL)
restartfunc();
if (cpu == 0 && cpustop_restartfunc != NULL) {
cpustop_restartfunc();
cpustop_restartfunc = NULL;
}
return 0;
}

View File

@ -1311,7 +1311,6 @@ ipi_nmi_handler()
{
int cpu = PCPU_GET(cpuid);
int cpumask = PCPU_GET(cpumask);
void (*restartfunc)(void);
if (!(ipi_nmi_pending & cpumask))
return 1;
@ -1330,10 +1329,10 @@ ipi_nmi_handler()
atomic_clear_int(&started_cpus, cpumask);
atomic_clear_int(&stopped_cpus, cpumask);
restartfunc = (void (*)(void))atomic_readandclear_int(
(u_int *)&cpustop_restartfunc);
if (restartfunc != NULL)
restartfunc();
if (cpu == 0 && cpustop_restartfunc != NULL) {
cpustop_restartfunc();
cpustop_restartfunc = NULL;
}
return 0;
}