x86 cpu_reset_proxy: no need to stop_cpus() the original processor

The processor is "parked" in a spin-loop already and that's sufficient
for the reset.  There is nothing that stop_cpus() would add here, only
extra complexity and fragility.
The original processor does not need to enable interrupts now, in fact,
it must not do that.

MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2018-04-02 07:45:13 +00:00
parent b92b26ad08
commit 5d29acd810
2 changed files with 0 additions and 8 deletions

View file

@ -569,14 +569,11 @@ cpu_set_user_tls(struct thread *td, void *tls_base)
static void
cpu_reset_proxy()
{
cpuset_t tcrp;
cpu_reset_proxy_active = 1;
while (cpu_reset_proxy_active == 1)
ia32_pause(); /* Wait for other cpu to see that we've started */
CPU_SETOF(cpu_reset_proxyid, &tcrp);
stop_cpus(tcrp);
printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid);
DELAY(1000000);
cpu_reset_real();
@ -616,7 +613,6 @@ cpu_reset()
}
if (cpu_reset_proxy_active == 0)
printf("cpu_reset: Failed to restart BSP\n");
enable_intr();
cpu_reset_proxy_active = 2;
while (1)

View file

@ -581,14 +581,11 @@ kvtop(void *addr)
static void
cpu_reset_proxy()
{
cpuset_t tcrp;
cpu_reset_proxy_active = 1;
while (cpu_reset_proxy_active == 1)
ia32_pause(); /* Wait for other cpu to see that we've started */
CPU_SETOF(cpu_reset_proxyid, &tcrp);
stop_cpus(tcrp);
printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid);
DELAY(1000000);
cpu_reset_real();
@ -628,7 +625,6 @@ cpu_reset()
}
if (cpu_reset_proxy_active == 0)
printf("cpu_reset: Failed to restart BSP\n");
enable_intr();
cpu_reset_proxy_active = 2;
while (1)