Prevent the TSC from being used on APM machines, we have no idea if
it runs at a constant frequency. This was less of an issue before, because the TSC only interpolated in the HZ intervals, but now where the timecounter is used all the way, this becomes much more visible. Nit: Fix a printf which triggered the bde-filter.
This commit is contained in:
parent
11ce6ce13a
commit
2004db6c2c
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.112 1998/02/21 20:45:27 jkh Exp $
|
||||
* $Id: clock.c,v 1.113 1998/02/23 00:11:25 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "apm.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -633,9 +634,9 @@ calibrate_clocks(void)
|
||||
tsc_freq = rdtsc();
|
||||
|
||||
if (bootverbose) {
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
if (tsc_present)
|
||||
printf("TSC clock: %u Hz, ", tsc_freq);
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
}
|
||||
return (tot_count);
|
||||
|
||||
@ -683,6 +684,9 @@ startrtclock()
|
||||
#ifdef SMP
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
#if NAPM > 0
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
|
||||
writertc(RTC_STATUSA, rtc_statusa);
|
||||
writertc(RTC_STATUSB, RTCSB_24HR);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.112 1998/02/21 20:45:27 jkh Exp $
|
||||
* $Id: clock.c,v 1.113 1998/02/23 00:11:25 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "apm.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -633,9 +634,9 @@ calibrate_clocks(void)
|
||||
tsc_freq = rdtsc();
|
||||
|
||||
if (bootverbose) {
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
if (tsc_present)
|
||||
printf("TSC clock: %u Hz, ", tsc_freq);
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
}
|
||||
return (tot_count);
|
||||
|
||||
@ -683,6 +684,9 @@ startrtclock()
|
||||
#ifdef SMP
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
#if NAPM > 0
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
|
||||
writertc(RTC_STATUSA, rtc_statusa);
|
||||
writertc(RTC_STATUSB, RTCSB_24HR);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.112 1998/02/21 20:45:27 jkh Exp $
|
||||
* $Id: clock.c,v 1.113 1998/02/23 00:11:25 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "apm.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -633,9 +634,9 @@ calibrate_clocks(void)
|
||||
tsc_freq = rdtsc();
|
||||
|
||||
if (bootverbose) {
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
if (tsc_present)
|
||||
printf("TSC clock: %u Hz, ", tsc_freq);
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
}
|
||||
return (tot_count);
|
||||
|
||||
@ -683,6 +684,9 @@ startrtclock()
|
||||
#ifdef SMP
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
#if NAPM > 0
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
|
||||
writertc(RTC_STATUSA, rtc_statusa);
|
||||
writertc(RTC_STATUSB, RTCSB_24HR);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.112 1998/02/21 20:45:27 jkh Exp $
|
||||
* $Id: clock.c,v 1.113 1998/02/23 00:11:25 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "apm.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -633,9 +634,9 @@ calibrate_clocks(void)
|
||||
tsc_freq = rdtsc();
|
||||
|
||||
if (bootverbose) {
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
if (tsc_present)
|
||||
printf("TSC clock: %u Hz, ", tsc_freq);
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
}
|
||||
return (tot_count);
|
||||
|
||||
@ -683,6 +684,9 @@ startrtclock()
|
||||
#ifdef SMP
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
#if NAPM > 0
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
|
||||
writertc(RTC_STATUSA, rtc_statusa);
|
||||
writertc(RTC_STATUSB, RTCSB_24HR);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.112 1998/02/21 20:45:27 jkh Exp $
|
||||
* $Id: clock.c,v 1.113 1998/02/23 00:11:25 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "apm.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -633,9 +634,9 @@ calibrate_clocks(void)
|
||||
tsc_freq = rdtsc();
|
||||
|
||||
if (bootverbose) {
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
if (tsc_present)
|
||||
printf("TSC clock: %u Hz, ", tsc_freq);
|
||||
printf("i8254 clock: %u Hz\n", tot_count);
|
||||
}
|
||||
return (tot_count);
|
||||
|
||||
@ -683,6 +684,9 @@ startrtclock()
|
||||
#ifdef SMP
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
#if NAPM > 0
|
||||
tsc_present = 0;
|
||||
#endif
|
||||
|
||||
writertc(RTC_STATUSA, rtc_statusa);
|
||||
writertc(RTC_STATUSB, RTCSB_24HR);
|
||||
|
Loading…
Reference in New Issue
Block a user