mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
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
c544ff8a5e
commit
3301c800f5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33929
@ -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