freebsd-dev/sys/alpha/include/smp.h
Matt Jacob 8f01c08a34 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})).
2001-07-14 21:37:57 +00:00

42 lines
1.1 KiB
C

/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $FreeBSD$
*
*/
#ifndef _MACHINE_SMP_H_
#define _MACHINE_SMP_H_
#ifdef _KERNEL
/*
* Interprocessor interrupts for SMP.
*/
#define IPI_INVLTLB 0x0001
#define IPI_RENDEZVOUS 0x0002
#define IPI_AST 0x0004
#define IPI_CHECKSTATE 0x0008
#define IPI_STOP 0x0010
#define IPI_HALT 0x1000
#ifndef LOCORE
extern u_int boot_cpu_id;
void ipi_selected(u_int cpus, u_int64_t ipi);
void ipi_all(u_int64_t ipi);
void ipi_all_but_self(u_int64_t ipi);
void ipi_self(u_int64_t ipi);
void smp_handle_ipi(struct trapframe *frame);
void smp_init_secondary(void);
#endif /* !LOCORE */
#endif /* _KERNEL */
#endif /* _MACHINE_SMP_H_ */