Fix reboot hangs that have happened with multiple processors

on Alpha 4100s.

Basically, if you're halting or you're rebooting, you should
tell all other processors to halt first. Define IPI_HALT- IPI_STOP
is not what we want for this purpose, which will call prom_halt(0)
on receipt.

The processor running the halt or reboot wil send an IPI_HALT to all
other processors, delay a bit, then continue to do what what it was
planning on doing (prom_halt({0|1})).
This commit is contained in:
Matt Jacob 2001-07-14 21:37:57 +00:00
parent 5822ff170e
commit 8f01c08a34
4 changed files with 26 additions and 3 deletions

View File

@ -239,8 +239,9 @@ static vm_offset_t pager_sva, pager_eva;
static void
alpha_srm_shutdown(void *junk, int howto)
{
if (howto & RB_HALT)
alpha_pal_halt();
if (howto & RB_HALT) {
cpu_halt();
}
}
static void
@ -1615,7 +1616,14 @@ cpu_boot(int howto)
void
cpu_halt(void)
{
/*alpha_pal_halt(); */
#ifdef SMP
printf("sending IPI_HALT to other processors\n");
DELAY(1000000);
ipi_all_but_self(IPI_HALT);
DELAY(1000000);
printf("Halting Self\n");
DELAY(1000000);
#endif
prom_halt(1);
}

View File

@ -472,6 +472,9 @@ smp_handle_ipi(struct trapframe *frame)
atomic_clear_int(&started_cpus, cpumask);
atomic_clear_int(&stopped_cpus, cpumask);
break;
case IPI_HALT:
prom_halt(1);
/* NOTREACHED */
}
}

View File

@ -95,6 +95,9 @@
#include <vm/vm_extern.h>
#include <sys/user.h>
#ifdef SMP
#include <machine/smp.h>
#endif
/*
* quick version of vm_fault
@ -388,6 +391,14 @@ vunmapbuf(bp)
void
cpu_reset()
{
#ifdef SMP
printf("sending IPI_HALT to other processors\n");
DELAY(1000000);
ipi_all_but_self(IPI_HALT);
DELAY(1000000);
printf("Rebooting Self\n");
DELAY(1000000);
#endif
prom_halt(0);
}

View File

@ -23,6 +23,7 @@
#define IPI_AST 0x0004
#define IPI_CHECKSTATE 0x0008
#define IPI_STOP 0x0010
#define IPI_HALT 0x1000
#ifndef LOCORE