Date: Wed, 23 Apr 2008 00:23:27 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 140435 for review Message-ID: <200804230023.m3N0NRRQ020493@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=140435 Change 140435 by marcel@marcel_xcllnt on 2008/04/23 00:22:38 IFC @140427 Affected files ... .. //depot/projects/bdb/sys/amd64/amd64/machdep.c#5 integrate .. //depot/projects/bdb/sys/amd64/include/clock.h#3 integrate .. //depot/projects/bdb/sys/amd64/isa/clock.c#3 integrate .. //depot/projects/bdb/sys/arm/sa11x0/sa11x0_ost.c#2 integrate .. //depot/projects/bdb/sys/i386/bios/apm.c#2 integrate .. //depot/projects/bdb/sys/i386/i386/machdep.c#3 integrate .. //depot/projects/bdb/sys/i386/include/clock.h#3 integrate .. //depot/projects/bdb/sys/i386/isa/clock.c#3 integrate .. //depot/projects/bdb/sys/i386/isa/pmtimer.c#2 integrate .. //depot/projects/bdb/sys/ia64/ia64/clock.c#3 integrate .. //depot/projects/bdb/sys/ia64/ia64/machdep.c#5 integrate .. //depot/projects/bdb/sys/kern/subr_clock.c#3 integrate .. //depot/projects/bdb/sys/kern/subr_rtc.c#2 integrate .. //depot/projects/bdb/sys/kern/vfs_mount.c#3 integrate .. //depot/projects/bdb/sys/nfsclient/nfs_vfsops.c#4 integrate .. //depot/projects/bdb/sys/pc98/cbus/clock.c#3 integrate .. //depot/projects/bdb/sys/pc98/pc98/machdep.c#4 integrate .. //depot/projects/bdb/sys/powerpc/aim/clock.c#3 integrate .. //depot/projects/bdb/sys/powerpc/aim/machdep.c#5 integrate .. //depot/projects/bdb/sys/powerpc/booke/clock.c#3 integrate .. //depot/projects/bdb/sys/sys/clock.h#2 integrate .. //depot/projects/bdb/sys/sys/time.h#3 integrate Differences ... ==== //depot/projects/bdb/sys/amd64/amd64/machdep.c#5 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.684 2008/04/19 07:25:57 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.685 2008/04/22 19:38:26 phk Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -61,7 +61,6 @@ #include <sys/buf.h> #include <sys/bus.h> #include <sys/callout.h> -#include <sys/clock.h> #include <sys/cons.h> #include <sys/cpu.h> #include <sys/eventhandler.h> ==== //depot/projects/bdb/sys/amd64/include/clock.h#3 (text+ko) ==== @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $FreeBSD: src/sys/amd64/include/clock.h,v 1.59 2008/04/14 07:59:59 phk Exp $ + * $FreeBSD: src/sys/amd64/include/clock.h,v 1.60 2008/04/22 19:38:27 phk Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -27,6 +27,7 @@ * Driver to clock driver interface. */ +void startrtclock(void); void init_TSC(void); void init_TSC_tc(void); ==== //depot/projects/bdb/sys/amd64/isa/clock.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.242 2008/04/14 07:59:59 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.243 2008/04/22 19:38:27 phk Exp $"); /* * Routines to handle clock hardware. @@ -45,7 +45,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/lock.h> #include <sys/kdb.h> #include <sys/mutex.h> ==== //depot/projects/bdb/sys/arm/sa11x0/sa11x0_ost.c#2 (text+ko) ==== @@ -38,14 +38,13 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.7 2007/02/26 05:17:47 kevlo Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.8 2008/04/22 19:38:27 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <sys/time.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/module.h> #include <machine/bus.h> ==== //depot/projects/bdb/sys/i386/bios/apm.c#2 (text+ko) ==== @@ -17,12 +17,11 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/bios/apm.c,v 1.150 2007/12/06 01:39:23 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/bios/apm.c,v 1.151 2008/04/22 19:38:27 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/conf.h> #include <sys/condvar.h> #include <sys/eventhandler.h> ==== //depot/projects/bdb/sys/i386/i386/machdep.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.668 2008/03/16 10:58:03 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.669 2008/04/22 19:38:27 phk Exp $"); #include "opt_apic.h" #include "opt_atalk.h" @@ -62,7 +62,6 @@ #include <sys/buf.h> #include <sys/bus.h> #include <sys/callout.h> -#include <sys/clock.h> #include <sys/cons.h> #include <sys/cpu.h> #include <sys/eventhandler.h> ==== //depot/projects/bdb/sys/i386/include/clock.h#3 (text+ko) ==== @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $FreeBSD: src/sys/i386/include/clock.h,v 1.61 2008/04/14 08:00:00 phk Exp $ + * $FreeBSD: src/sys/i386/include/clock.h,v 1.62 2008/04/22 19:38:28 phk Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -27,6 +27,7 @@ * Driver to clock driver interface. */ +void startrtclock(void); void timer_restore(void); void init_TSC(void); void init_TSC_tc(void); ==== //depot/projects/bdb/sys/i386/isa/clock.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/isa/clock.c,v 1.247 2008/04/14 08:00:00 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/isa/clock.c,v 1.248 2008/04/22 19:38:28 phk Exp $"); /* * Routines to handle clock hardware. @@ -48,7 +48,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/lock.h> #include <sys/kdb.h> #include <sys/mutex.h> ==== //depot/projects/bdb/sys/i386/isa/pmtimer.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/isa/pmtimer.c,v 1.6 2006/10/02 12:59:57 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/isa/pmtimer.c,v 1.7 2008/04/22 19:38:28 phk Exp $"); /* * Timer device driver for power management events. @@ -35,7 +35,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/kernel.h> #include <sys/module.h> #include <sys/syslog.h> ==== //depot/projects/bdb/sys/ia64/ia64/clock.c#3 (text+ko) ==== @@ -25,16 +25,14 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/ia64/ia64/clock.c,v 1.33 2008/04/15 17:02:23 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/clock.c,v 1.34 2008/04/22 19:38:28 phk Exp $"); #include <sys/param.h> #include <sys/kernel.h> -#include <sys/clock.h> #include <sys/queue.h> #include <sys/sysctl.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/timetc.h> #include <sys/pcpu.h> ==== //depot/projects/bdb/sys/ia64/ia64/machdep.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.236 2008/04/15 05:02:42 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.237 2008/04/22 19:38:28 phk Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -261,7 +261,6 @@ */ identifycpu(); - /* startrtclock(); */ #ifdef PERFMON perfmon_init(); #endif ==== //depot/projects/bdb/sys/kern/subr_clock.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/subr_clock.c,v 1.14 2008/04/12 21:51:54 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_clock.c,v 1.15 2008/04/22 19:38:28 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -52,18 +52,14 @@ #define ct_debug bootverbose static int adjkerntz; /* local offset from GMT in seconds */ static int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ -int disable_rtc_set; /* disable resettodr() if != 0 */ int tz_minuteswest; int tz_dsttime; /* - * These have traditionally been in machdep, but should probably be moved to + * This have traditionally been in machdep, but should probably be moved to * kern. */ -SYSCTL_INT(_machdep, OID_AUTO, disable_rtc_set, - CTLFLAG_RW, &disable_rtc_set, 0, ""); - SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, CTLFLAG_RW, &wall_cmos_clock, 0, ""); @@ -71,8 +67,7 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) { int error; - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, - req); + error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); if (!error && req->newptr) resettodr(); return (error); ==== //depot/projects/bdb/sys/kern/subr_rtc.c#2 (text+ko) ==== @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/subr_rtc.c,v 1.9 2006/10/02 18:23:37 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_rtc.c,v 1.10 2008/04/22 19:38:28 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -63,6 +63,11 @@ static device_t clock_dev = NULL; static long clock_res; +/* XXX: should be kern. now, it's no longer machdep. */ +static int disable_rtc_set; +SYSCTL_INT(_machdep, OID_AUTO, disable_rtc_set, + CTLFLAG_RW, &disable_rtc_set, 0, ""); + void clock_register(device_t dev, long res) /* res has units of microseconds */ { @@ -118,6 +123,7 @@ "will not be set accurately\n"); return; } + /* XXX: We should poll all registered RTCs in case of failure */ error = CLOCK_GETTIME(clock_dev, &ts); if (error != 0 && error != EINVAL) { printf("warning: clock_gettime failed (%d), the system time " @@ -158,6 +164,7 @@ getnanotime(&ts); ts.tv_sec -= utc_offset(); + /* XXX: We should really set all registered RTCs */ if ((error = CLOCK_SETTIME(clock_dev, &ts)) != 0) { printf("warning: clock_settime failed (%d), time-of-day clock " "not adjusted to system time\n", error); ==== //depot/projects/bdb/sys/kern/vfs_mount.c#3 (text+ko) ==== @@ -35,11 +35,10 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.279 2008/04/08 17:53:33 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.280 2008/04/22 19:38:28 phk Exp $"); #include <sys/param.h> #include <sys/conf.h> -#include <sys/clock.h> #include <sys/fcntl.h> #include <sys/jail.h> #include <sys/kernel.h> ==== //depot/projects/bdb/sys/nfsclient/nfs_vfsops.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vfsops.c,v 1.203 2008/03/22 09:15:15 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/nfsclient/nfs_vfsops.c,v 1.204 2008/04/22 19:38:29 phk Exp $"); #include "opt_bootp.h" @@ -44,7 +44,6 @@ #include <sys/kernel.h> #include <sys/bio.h> #include <sys/buf.h> -#include <sys/clock.h> #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> ==== //depot/projects/bdb/sys/pc98/cbus/clock.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/pc98/cbus/clock.c,v 1.168 2008/04/19 08:18:47 nyan Exp $"); +__FBSDID("$FreeBSD: src/sys/pc98/cbus/clock.c,v 1.169 2008/04/22 19:38:29 phk Exp $"); /* * Routines to handle clock hardware. @@ -51,7 +51,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/lock.h> #include <sys/kdb.h> #include <sys/mutex.h> ==== //depot/projects/bdb/sys/pc98/pc98/machdep.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/pc98/pc98/machdep.c,v 1.403 2008/03/16 10:58:08 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/pc98/pc98/machdep.c,v 1.404 2008/04/22 19:38:29 phk Exp $"); #include "opt_atalk.h" #include "opt_compat.h" @@ -60,7 +60,6 @@ #include <sys/buf.h> #include <sys/bus.h> #include <sys/callout.h> -#include <sys/clock.h> #include <sys/cons.h> #include <sys/cpu.h> #include <sys/eventhandler.h> ==== //depot/projects/bdb/sys/powerpc/aim/clock.c#3 (text+ko) ==== @@ -56,14 +56,13 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/powerpc/aim/clock.c,v 1.32 2008/04/21 04:41:37 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/aim/clock.c,v 1.33 2008/04/22 19:38:30 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/timetc.h> #include <sys/interrupt.h> ==== //depot/projects/bdb/sys/powerpc/aim/machdep.c#5 (text+ko) ==== @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/powerpc/aim/machdep.c,v 1.112 2008/04/16 23:28:12 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/aim/machdep.c,v 1.113 2008/04/22 19:38:30 phk Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -196,7 +196,6 @@ */ cpu_setup(PCPU_GET(cpuid)); - /* startrtclock(); */ #ifdef PERFMON perfmon_init(); #endif ==== //depot/projects/bdb/sys/powerpc/booke/clock.c#3 (text+ko) ==== @@ -56,14 +56,13 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/powerpc/booke/clock.c,v 1.3 2008/04/13 21:20:26 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/booke/clock.c,v 1.4 2008/04/22 19:38:30 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/timetc.h> #include <sys/interrupt.h> ==== //depot/projects/bdb/sys/sys/clock.h#2 (text+ko) ==== @@ -35,7 +35,20 @@ * * $NetBSD: clock_subr.h,v 1.7 2000/10/03 13:41:07 tsutsui Exp $ * - * $FreeBSD: src/sys/sys/clock.h,v 1.7 2006/10/24 10:27:23 phk Exp $ + * + * This file is the central clearing-house for calendrical issues. + * + * In general the kernel does not know about minutes, hours, days, timezones, + * daylight savings time, leap-years and such. All that is theoretically a + * matter for userland only. + * + * Parts of kernel code does however care: badly designed filesystems store + * timestamps in local time and RTC chips sometimes track time in a local + * timezone instead of UTC and so on. + * + * All that code should go here for service. + * + * $FreeBSD: src/sys/sys/clock.h,v 1.8 2008/04/22 19:38:30 phk Exp $ */ #ifndef _SYS_CLOCK_H_ @@ -44,15 +57,6 @@ #ifdef _KERNEL /* No user serviceable parts */ /* - * Kernel to clock driver interface. - */ -void inittodr(time_t base); -void resettodr(void); -void startrtclock(void); - -extern int disable_rtc_set; - -/* * Timezone info from settimeofday(2), usually not used */ extern int tz_minuteswest; ==== //depot/projects/bdb/sys/sys/time.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)time.h 8.5 (Berkeley) 5/4/95 - * $FreeBSD: src/sys/sys/time.h,v 1.76 2008/03/31 12:14:04 kib Exp $ + * $FreeBSD: src/sys/sys/time.h,v 1.77 2008/04/22 19:38:30 phk Exp $ */ #ifndef _SYS_TIME_H_ @@ -255,6 +255,13 @@ #endif #ifdef _KERNEL + +/* + * Kernel to clock driver interface. + */ +void inittodr(time_t base); +void resettodr(void); + extern time_t time_second; extern time_t time_uptime; extern struct timeval boottime;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804230023.m3N0NRRQ020493>