PERFORCE change 137181 for review
John Birrell
jb at FreeBSD.org
Sat Mar 8 19:44:48 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=137181
Change 137181 by jb at jb_freebsd8 on 2008/03/08 19:43:45
Add support for cyclic hooks on machines without a LAPIC.
Affected files ...
.. //depot/projects/dtrace/src/sys/i386/isa/clock.c#10 edit
Differences ...
==== //depot/projects/dtrace/src/sys/i386/isa/clock.c#10 (text+ko) ====
@@ -48,6 +48,7 @@
#include "opt_apic.h"
#include "opt_clock.h"
+#include "opt_kdtrace.h"
#include "opt_isa.h"
#include "opt_mca.h"
#include "opt_xbox.h"
@@ -97,6 +98,10 @@
#include <i386/bios/mca_machdep.h>
#endif
+#ifdef KDTRACE_HOOKS
+#include <sys/dtrace_bsd.h>
+#endif
+
#define TIMER_DIV(x) ((timer_freq + (x) / 2) / (x))
int clkintr_pending;
@@ -161,6 +166,18 @@
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));
#ifdef DEV_MCA
/* Reset clock interrupt by asserting bit 7 of port 0x61 */
More information about the p4-projects
mailing list