Date: Sat, 8 Mar 2008 19:44:47 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 137181 for review Message-ID: <200803081944.m28Jil7v050424@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137181 Change 137181 by jb@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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803081944.m28Jil7v050424>