From owner-p4-projects@FreeBSD.ORG Sun Apr 25 12:17:01 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B80A816A4D0; Sun, 25 Apr 2004 12:17:00 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9339116A4CE for ; Sun, 25 Apr 2004 12:17:00 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76A1943D45 for ; Sun, 25 Apr 2004 12:17:00 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i3PJH0Ge034143 for ; Sun, 25 Apr 2004 12:17:00 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i3PJH0FN034138 for perforce@freebsd.org; Sun, 25 Apr 2004 12:17:00 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sun, 25 Apr 2004 12:17:00 -0700 (PDT) Message-Id: <200404251917.i3PJH0FN034138@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 51722 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2004 19:17:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=51722 Change 51722 by marcel@marcel_nfs on 2004/04/25 12:16:28 MFi386 While here, remove a now stale comment in both the i386 and amd64 versions. Affected files ... .. //depot/projects/gdb/sys/amd64/isa/clock.c#3 edit .. //depot/projects/gdb/sys/i386/isa/clock.c#6 edit Differences ... ==== //depot/projects/gdb/sys/amd64/isa/clock.c#3 (text+ko) ==== @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -291,18 +292,8 @@ * takes about 1.5 usec for each of the i/o's in getit(). The loop * takes about 6 usec on a 486/33 and 13 usec on a 386/20. The * multiplications and divisions to scale the count take a while). - * - * However, if ddb is active then use a fake counter since reading - * the i8254 counter involves acquiring a lock. ddb must not go - * locking for many reasons, but it calls here for at least atkbd - * input. */ -#ifdef DDB - if (db_active) - prev_tick = 0; - else -#endif - prev_tick = getit(); + prev_tick = getit(); n -= 0; /* XXX actually guess no initial overhead */ /* * Calculate (n * (timer_freq / 1e6)) without using floating point @@ -329,13 +320,7 @@ / 1000000; while (ticks_left > 0) { -#ifdef DDB - if (db_active) { - inb(0x84); - tick = prev_tick + 1; - } else -#endif - tick = getit(); + tick = getit(); #ifdef DELAYDEBUG ++getit_calls; #endif @@ -380,10 +365,17 @@ splx(x); return (-1); /* XXX Should be EBUSY, but nobody cares anyway. */ } - mtx_lock_spin(&clock_lock); +#ifdef KDB + if (!kdb_active) +#endif + mtx_lock_spin(&clock_lock); outb(TIMER_CNTR2, pitch); outb(TIMER_CNTR2, (pitch>>8)); - mtx_unlock_spin(&clock_lock); +#ifdef KDB + if (!kdb_active) +#endif + mtx_unlock_spin(&clock_lock); + if (!beeping) { /* enable counter2 output to speaker */ outb(IO_PPI, inb(IO_PPI) | 3); ==== //depot/projects/gdb/sys/i386/isa/clock.c#6 (text+ko) ==== @@ -455,11 +455,6 @@ * takes about 1.5 usec for each of the i/o's in getit(). The loop * takes about 6 usec on a 486/33 and 13 usec on a 386/20. The * multiplications and divisions to scale the count take a while). - * - * However, if ddb is active then use a fake counter since reading - * the i8254 counter involves acquiring a lock. ddb must not go - * locking for many reasons, but it calls here for at least atkbd - * input. */ prev_tick = getit(); n -= 0; /* XXX actually guess no initial overhead */