From owner-p4-projects@FreeBSD.ORG Sat Jan 5 19:48:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4B17E16A41A; Sat, 5 Jan 2008 19:48:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10FA616A418 for ; Sat, 5 Jan 2008 19:48:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 06A1413C478 for ; Sat, 5 Jan 2008 19:48:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m05Jmg8N001569 for ; Sat, 5 Jan 2008 19:48:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m05Jmgpk001566 for perforce@freebsd.org; Sat, 5 Jan 2008 19:48:42 GMT (envelope-from jb@freebsd.org) Date: Sat, 5 Jan 2008 19:48:42 GMT Message-Id: <200801051948.m05Jmgpk001566@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 132573 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 19:48:43 -0000 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 -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. */