From owner-cvs-all@FreeBSD.ORG Sun Aug 3 22:13:22 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FE1B37B401; Sun, 3 Aug 2003 22:13:19 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7213143FA3; Sun, 3 Aug 2003 22:13:19 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h745DJ0U078950; Sun, 3 Aug 2003 22:13:19 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h745DJkv078949; Sun, 3 Aug 2003 22:13:19 -0700 (PDT) Message-Id: <200308040513.h745DJkv078949@repoman.freebsd.org> From: Marcel Moolenaar Date: Sun, 3 Aug 2003 22:13:19 -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/ia64/ia64 clock.c interrupt.c machdep.c mp_machdep.c timerreg.h src/sys/ia64/include clock.h cpu.h pcpu.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2003 05:13:22 -0000 marcel 2003/08/03 22:13:19 PDT FreeBSD src repository Modified files: sys/ia64/ia64 clock.c interrupt.c machdep.c mp_machdep.c sys/ia64/include clock.h cpu.h pcpu.h Removed files: sys/ia64/ia64 timerreg.h Log: Cleanup the clock code. This includes: o Remove alpha specific timer code (mc146818A) and compiled-out calibration of said timer. o Remove i386 inherited timer code (i8253) and related acquire and release functions. o Move sysbeep() from clock.c to machdep.c and have it return ENODEV. Console beeps should be implemented using ACPI or if no such device is described, using the sound driver. o Move the sysctls related to adjkerntz, disable_rtc_set and wall_cmos_clock from machdep.c to clock.c, where the variables are. o Don't hardcode a hz value of 1024 in cpu_initclocks() and don't bother faking a stathz that's 1/8 of that. Keep it simple: hz defaults to HZ and stathz equals hz. This is also how it's done for sparc64. o Keep a per-CPU ITC counter (pc_clock) and adjustment (pc_clockadj) to calculate ITC skew and corrections. On average, we adjust the ITC match register once every ~1500 interrupts for a duration of 2 consequtive interruprs. This is to correct the non-deterministic behaviour of the ITC interrupt (there's a delay between the match and the raising of the interrupt). o Add 4 debugging sysctls to monitor clock behaviour. Those are debug.clock_adjust_edges, debug.clock_adjust_excess, debug.clock_adjust_lost and debug.clock_adjust_ticks. The first counts the individual adjustment cycles (when the skew first crosses the threshold), the second counts the number of times the adjustment was excessive (any non-zero value is to be considered a bug), the third counts lost clock interrupts and the last counts the number of interrupts for which we applied an adjustment (debug.clock_adjust_ticks / debug.clock_adjust_edges gives the avarage duration of an individual adjustment -- should be ~2). While here, remove some nearby (trivial) left-overs from alpha and other cleanups. Revision Changes Path 1.22 +73 -255 src/sys/ia64/ia64/clock.c 1.38 +74 -45 src/sys/ia64/ia64/interrupt.c 1.146 +6 -20 src/sys/ia64/ia64/machdep.c 1.49 +4 -3 src/sys/ia64/ia64/mp_machdep.c 1.2 +0 -110 src/sys/ia64/ia64/timerreg.h (dead) 1.9 +6 -8 src/sys/ia64/include/clock.h 1.35 +4 -15 src/sys/ia64/include/cpu.h 1.15 +6 -2 src/sys/ia64/include/pcpu.h