summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2008-05-24 09:07:52 +0000
committernyan <nyan@FreeBSD.org>2008-05-24 09:07:52 +0000
commitb94b3707da8c4231e8d87fb99f8d6903c50d61a1 (patch)
tree210e1d52197f58ab717e60526783463cf0318a30 /sys/pc98/cbus
parent792d40b14c16867ecaba0a93419ee3ee90f4d615 (diff)
downloadFreeBSD-src-b94b3707da8c4231e8d87fb99f8d6903c50d61a1.zip
FreeBSD-src-b94b3707da8c4231e8d87fb99f8d6903c50d61a1.tar.gz
MFi386: revision 1.249
Add a cyclic hook for DTrace.
Diffstat (limited to 'sys/pc98/cbus')
-rw-r--r--sys/pc98/cbus/clock.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c
index 86dc687..6e1242f 100644
--- a/sys/pc98/cbus/clock.c
+++ b/sys/pc98/cbus/clock.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include "opt_apic.h"
#include "opt_clock.h"
+#include "opt_kdtrace.h"
#include "opt_isa.h"
#include "opt_mca.h"
@@ -77,6 +78,10 @@ __FBSDID("$FreeBSD$");
#include <isa/isavar.h>
#endif
+#ifdef KDTRACE_HOOKS
+#include <sys/dtrace_bsd.h>
+#endif
+
#define TIMER_DIV(x) ((i8254_freq + (x) / 2) / (x))
int clkintr_pending;
@@ -134,6 +139,18 @@ clkintr(struct trapframe *frame)
mtx_unlock_spin(&clock_lock);
}
KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer"));
+
+#ifdef KDTRACE_HOOKS
+ /*
+ * If the DTrace hooks are configured and a callback function
+ * has been registered, then call it to process the high speed
+ * timers.
+ */
+ int cpu = PCPU_GET(cpuid);
+ if (lapic_cyclic_clock_func[cpu] != NULL)
+ (*lapic_cyclic_clock_func[cpu])(frame);
+#endif
+
hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
return (FILTER_HANDLED);
}
OpenPOWER on IntegriCloud