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