pcrtc.c (69614) | pcrtc.c (71262) |
---|---|
1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz and Don Ahn. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 | 1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz and Don Ahn. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 |
37 * $FreeBSD: head/sys/pc98/cbus/pcrtc.c 69614 2000-12-05 09:35:54Z kato $ | 37 * $FreeBSD: head/sys/pc98/cbus/pcrtc.c 71262 2001-01-19 14:09:54Z peter $ |
38 */ 39 40/* 41 * Routines to handle clock hardware. 42 */ 43 44/* 45 * inittodr, settodr and support routines written 46 * by Christoph Robitschko <chmr@edvz.tu-graz.ac.at> 47 * 48 * reintroduced and updated by Chris Stenton <chris@gnome.co.uk> 8/10/94 49 */ 50 51/* 52 * modified for PC98 by Kakefuda 53 */ 54 55#include "opt_clock.h" | 38 */ 39 40/* 41 * Routines to handle clock hardware. 42 */ 43 44/* 45 * inittodr, settodr and support routines written 46 * by Christoph Robitschko <chmr@edvz.tu-graz.ac.at> 47 * 48 * reintroduced and updated by Chris Stenton <chris@gnome.co.uk> 8/10/94 49 */ 50 51/* 52 * modified for PC98 by Kakefuda 53 */ 54 55#include "opt_clock.h" |
56#include "apm.h" | 56#include "opt_apm.h" |
57 58#include <sys/param.h> 59#include <sys/systm.h> 60#include <sys/bus.h> 61#include <sys/ipl.h> 62#include <sys/mutex.h> 63#include <sys/proc.h> 64#include <sys/time.h> --- 918 unchanged lines hidden (view full) --- 983#if !defined(SMP) 984 /* 985 * We can not use the TSC in SMP mode, until we figure out a 986 * cheap (impossible), reliable and precise (yeah right!) way 987 * to synchronize the TSCs of all the CPUs. 988 * Curse Intel for leaving the counter out of the I/O APIC. 989 */ 990 | 57 58#include <sys/param.h> 59#include <sys/systm.h> 60#include <sys/bus.h> 61#include <sys/ipl.h> 62#include <sys/mutex.h> 63#include <sys/proc.h> 64#include <sys/time.h> --- 918 unchanged lines hidden (view full) --- 983#if !defined(SMP) 984 /* 985 * We can not use the TSC in SMP mode, until we figure out a 986 * cheap (impossible), reliable and precise (yeah right!) way 987 * to synchronize the TSCs of all the CPUs. 988 * Curse Intel for leaving the counter out of the I/O APIC. 989 */ 990 |
991#if NAPM > 0 | 991#ifdef DEV_APM |
992 /* 993 * We can not use the TSC if we support APM. Precise timekeeping 994 * on an APM'ed machine is at best a fools pursuit, since 995 * any and all of the time spent in various SMM code can't 996 * be reliably accounted for. Reading the RTC is your only 997 * source of reliable time info. The i8254 looses too of course 998 * but we need to have some kind of time... 999 * We don't know at this point whether APM is going to be used 1000 * or not, nor when it might be activated. Play it safe. 1001 */ 1002 { 1003 int disabled = 0; 1004 resource_int_value("apm", 0, "disabled", &disabled); 1005 if (disabled == 0) 1006 return; 1007 } | 992 /* 993 * We can not use the TSC if we support APM. Precise timekeeping 994 * on an APM'ed machine is at best a fools pursuit, since 995 * any and all of the time spent in various SMM code can't 996 * be reliably accounted for. Reading the RTC is your only 997 * source of reliable time info. The i8254 looses too of course 998 * but we need to have some kind of time... 999 * We don't know at this point whether APM is going to be used 1000 * or not, nor when it might be activated. Play it safe. 1001 */ 1002 { 1003 int disabled = 0; 1004 resource_int_value("apm", 0, "disabled", &disabled); 1005 if (disabled == 0) 1006 return; 1007 } |
1008#endif /* NAPM > 0 */ | 1008#endif /* DEV_APM */ |
1009 1010 if (tsc_present && tsc_freq != 0 && !tsc_is_broken) { 1011 tsc_timecounter.tc_frequency = tsc_freq; 1012 tc_init(&tsc_timecounter); 1013 } 1014 1015#endif /* !defined(SMP) */ 1016} --- 605 unchanged lines hidden --- | 1009 1010 if (tsc_present && tsc_freq != 0 && !tsc_is_broken) { 1011 tsc_timecounter.tc_frequency = tsc_freq; 1012 tc_init(&tsc_timecounter); 1013 } 1014 1015#endif /* !defined(SMP) */ 1016} --- 605 unchanged lines hidden --- |