PERFORCE change 132573 for review
John Birrell
jb at FreeBSD.org
Sat Jan 5 11:48:43 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=132573
Change 132573 by jb at jb_freebsd1 on 2008/01/05 19:48:32
Update to match the amd64 implementation.
Affected files ...
.. //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#15 edit
Differences ...
==== //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#15 (text+ko) ====
@@ -68,7 +68,7 @@
#ifdef KDTRACE_HOOKS
#include <sys/dtrace_bsd.h>
-cyclic_clock_func_t lapic_cyclic_clock_func;
+cyclic_clock_func_t lapic_cyclic_clock_func[MAXCPU];
#endif
/* Sanity checks on IDT vectors. */
@@ -676,6 +676,17 @@
(*la->la_timer_count)++;
critical_enter();
+#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
+
/* Fire hardclock at hz. */
la->la_hard_ticks += hz;
if (la->la_hard_ticks >= lapic_timer_hz) {
@@ -684,19 +695,6 @@
hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
else
hardclock_cpu(TRAPF_USERMODE(frame));
-
-#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. If this function is registered
- * here, then there mustn't be a High Performance Event
- * Timer (HPET) on the CPU. A HPET provides higher
- * performance timer interrupts.
- */
- if (lapic_cyclic_clock_func != NULL)
- (*lapic_cyclic_clock_func)();
-#endif
}
/* Fire statclock at stathz. */
More information about the p4-projects
mailing list