From owner-cvs-src@FreeBSD.ORG Tue Apr 20 17:48:17 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFDC616A4CE; Tue, 20 Apr 2004 17:48:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA83343D1F; Tue, 20 Apr 2004 17:48:17 -0700 (PDT) (envelope-from njl@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 i3L0mHGe048002; Tue, 20 Apr 2004 17:48:17 -0700 (PDT) (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i3L0mHid048001; Tue, 20 Apr 2004 17:48:17 -0700 (PDT) (envelope-from njl) Message-Id: <200404210048.i3L0mHid048001@repoman.freebsd.org> From: Nate Lawson Date: Tue, 20 Apr 2004 17:48:17 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/acpica acpi_timer.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 00:48:17 -0000 njl 2004/04/20 17:48:17 PDT FreeBSD src repository Modified files: sys/dev/acpica acpi_timer.c Log: Fix several bugs where 32-bit timers and wraparound were not properly supported. Symptoms of this bug included unnecessary use of ACPI-safe and a dmesg that has deltas of about 2^24: ACPI timer looks BAD min = 2, max = 16777206, width = 16777204 ACPI timer looks BAD min = 2, max = 7, width = 5 ACPI timer looks GOOD min = 4, max = 5, width = 1 ACPI timer looks BAD min = 2, max = 16777206, width = 16777204 ACPI timer looks BAD min = 2, max = 7, width = 5 ACPI timer looks BAD min = 2, max = 16777210, width = 16777208 ACPI timer looks BAD min = 4, max = 16777189, width = 16777185 ACPI timer looks GOOD min = 4, max = 5, width = 1 ACPI timer looks BAD min = 2, max = 7, width = 5 ACPI timer looks BAD min = 4, max = 16777189, width = 16777185 To fix this: * Use a 32 bit timecounter mask when the timer is 32 bits. * In test_counter(), use the acpi_TimerDelta function which handles 24/32 bit timers and wraparound. Miscellaneous fixes: * Use C99 initializers for timecounter struct. * Use u_int and uint32_t where appropriate instead of unsigned. * Remove whitespace-only lines * Remove the old PIIX4 PCI workaround. The timecounter testing code has been in use for long enough to prove it's functional. Revision Changes Path 1.29 +26 -110 src/sys/dev/acpica/acpi_timer.c