summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-08-30 23:33:33 +0000
committerpeter <peter@FreeBSD.org>2004-08-30 23:33:33 +0000
commit43365c0b41ba8c25be618a3ee25e004e55913400 (patch)
treedb52b25c7b05ebfb6d3cc1f20e80f5f21634220b
parent1d9abdbe783a3f2587fde29b89cda1c8da982097 (diff)
downloadFreeBSD-src-43365c0b41ba8c25be618a3ee25e004e55913400.zip
FreeBSD-src-43365c0b41ba8c25be618a3ee25e004e55913400.tar.gz
Add the mp_watchdog hooks, although it locks up my SMP test box. It might
be useable to somebody.
-rw-r--r--sys/amd64/amd64/mp_machdep.c9
-rw-r--r--sys/conf/files.amd641
-rw-r--r--sys/conf/options.amd641
3 files changed, 11 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 989b804..793a56e 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include "opt_cpu.h"
#include "opt_kstack_pages.h"
+#include "opt_mp_watchdog.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,6 +57,7 @@ __FBSDID("$FreeBSD$");
#include <machine/apicreg.h>
#include <machine/clock.h>
#include <machine/md_var.h>
+#include <machine/mp_watchdog.h>
#include <machine/pcb.h>
#include <machine/psl.h>
#include <machine/smp.h>
@@ -1067,8 +1069,15 @@ int
mp_grab_cpu_hlt(void)
{
u_int mask = PCPU_GET(cpumask);
+#ifdef MP_WATCHDOG
+ u_int cpuid = PCPU_GET(cpuid);
+#endif
int retval;
+#ifdef MP_WATCHDOG
+ ap_watchdog(cpuid);
+#endif
+
retval = mask & hlt_cpus_mask;
while (mask & hlt_cpus_mask)
__asm __volatile("sti; hlt" : : : "memory");
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index f4e72d6..4413e82 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -79,6 +79,7 @@ amd64/amd64/locore.S standard no-obj
amd64/amd64/machdep.c standard
amd64/amd64/mem.c optional mem
amd64/amd64/mp_machdep.c optional smp
+amd64/amd64/mp_watchdog.c optional mp_watchdog smp
amd64/amd64/mpboot.S optional smp
amd64/amd64/mptable.c optional mptable
amd64/amd64/mptable_pci.c optional mptable pci
diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64
index a6dce41..8da2f89 100644
--- a/sys/conf/options.amd64
+++ b/sys/conf/options.amd64
@@ -6,6 +6,7 @@ AUTO_EOI_2 opt_auto_eoi.h
MAXMEM
PERFMON opt_perfmon.h
PMAP_SHPGPERPROC opt_pmap.h
+MP_WATCHDOG opt_mp_watchdog.h
# Options for emulators. These should only be used at config time, so
# they are handled like options for static filesystems
OpenPOWER on IntegriCloud