From owner-cvs-src-old@FreeBSD.ORG Sun Jun 20 21:35:23 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EF481065670 for ; Sun, 20 Jun 2010 21:35:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 097408FC17 for ; Sun, 20 Jun 2010 21:35:23 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o5KLZMxi091817 for ; Sun, 20 Jun 2010 21:35:22 GMT (envelope-from mav@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o5KLZMP9091816 for cvs-src-old@freebsd.org; Sun, 20 Jun 2010 21:35:22 GMT (envelope-from mav@repoman.freebsd.org) Message-Id: <201006202135.o5KLZMP9091816@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to mav@repoman.freebsd.org using -f From: Alexander Motin Date: Sun, 20 Jun 2010 21:33:29 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 mp_machdep.c src/sys/amd64/include apicvar.h src/sys/conf files files.amd64 files.i386 src/sys/dev/acpica acpi_hpet.c acpi_hpet.h src/sys/i386/i386 mp_machdep.c src/sys/i386/include apicvar.h src/sys/isa rtc.h ... X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2010 21:35:23 -0000 mav 2010-06-20 21:33:29 UTC FreeBSD src repository Modified files: sys/amd64/amd64 mp_machdep.c sys/amd64/include apicvar.h sys/conf files files.amd64 files.i386 sys/dev/acpica acpi_hpet.c acpi_hpet.h sys/i386/i386 mp_machdep.c sys/i386/include apicvar.h sys/isa rtc.h sys/kern kern_clock.c sys/pc98/cbus clock.c sys/sys systm.h sys/x86/isa atrtc.c clock.c sys/x86/x86 local_apic.c Added files: sys/kern kern_et.c sys/sys timeet.h sys/x86/x86 timeevents.c Log: SVN rev 209371 on 2010-06-20 21:33:29Z by mav Implement new event timers infrastructure. It provides unified APIs for writing event timer drivers, for choosing best possible drivers by machine independent code and for operating them to supply kernel with hardclock(), statclock() and profclock() events in unified fashion on various hardware. Infrastructure provides support for both per-CPU (independent for every CPU core) and global timers in periodic and one-shot modes. MI management code at this moment uses only periodic mode, but one-shot mode use planned for later, as part of tickless kernel project. For this moment infrastructure used on i386 and amd64 architectures. Other archs are welcome to follow, while their current operation should not be affected. This patch updates existing drivers (i8254, RTC and LAPIC) for the new order, and adds event timers support into the HPET driver. These drivers have different capabilities: LAPIC - per-CPU timer, supports periodic and one-shot operation, may freeze in C3 state, calibrated on first use, so may be not exactly precise. HPET - depending on hardware can work as per-CPU or global, supports periodic and one-shot operation, usually provides several event timers. i8254 - global, limited to periodic mode, because same hardware used also as time counter. RTC - global, supports only periodic mode, set of frequencies in Hz limited by powers of 2. Depending on hardware capabilities, drivers preferred in following orders, either LAPIC, HPETs, i8254, RTC or HPETs, LAPIC, i8254, RTC. User may explicitly specify wanted timers via loader tunables or sysctls: kern.eventtimer.timer1 and kern.eventtimer.timer2. If requested driver is unavailable or unoperational, system will try to replace it. If no more timers available or "NONE" specified for second, system will operate using only one timer, multiplying it's frequency by few times and uing respective dividers to honor hz, stathz and profhz values, set during initial setup. Revision Changes Path 1.318 +2 -1 src/sys/amd64/amd64/mp_machdep.c 1.37 +0 -7 src/sys/amd64/include/apicvar.h 1.1521 +1 -0 src/sys/conf/files 1.160 +1 -0 src/sys/conf/files.amd64 1.644 +1 -0 src/sys/conf/files.i386 1.21 +444 -75 src/sys/dev/acpica/acpi_hpet.c 1.2 +1 -1 src/sys/dev/acpica/acpi_hpet.h 1.308 +2 -1 src/sys/i386/i386/mp_machdep.c 1.40 +0 -7 src/sys/i386/include/apicvar.h 1.16 +0 -4 src/sys/isa/rtc.h 1.217 +6 -6 src/sys/kern/kern_clock.c 1.1 +232 -0 src/sys/kern/kern_et.c (new) 1.180 +22 -39 src/sys/pc98/cbus/clock.c 1.287 +2 -0 src/sys/sys/systm.h 1.1 +103 -0 src/sys/sys/timeet.h (new) 1.2 +104 -39 src/sys/x86/isa/atrtc.c 1.6 +117 -217 src/sys/x86/isa/clock.c 1.5 +115 -98 src/sys/x86/x86/local_apic.c 1.1 +509 -0 src/sys/x86/x86/timeevents.c (new)