aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorMitsuru IWASAKI <iwasaki@FreeBSD.org>2001-11-01 16:34:07 +0000
committerMitsuru IWASAKI <iwasaki@FreeBSD.org>2001-11-01 16:34:07 +0000
commitf9390180fe3afa600d83de925f2e5c4a2eb676c7 (patch)
tree386182cbb6b07e9a3fa20ca8415118c34d61ecae /sys/amd64
parent3c560efb1a384cf515adb2f07d93b8e05797e6e9 (diff)
Notes
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/tsc.c11
-rw-r--r--sys/amd64/isa/clock.c11
2 files changed, 8 insertions, 14 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 13e11a4315a2..a7aaea0b7a5e 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -49,7 +49,6 @@
*/
#include "opt_clock.h"
-#include "opt_apm.h"
#include "opt_mca.h"
#include <sys/param.h>
@@ -63,6 +62,7 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/cons.h>
+#include <sys/power.h>
#include <machine/clock.h>
#ifdef CLK_CALIBRATION_LOOP
@@ -823,7 +823,6 @@ startrtclock()
* Curse Intel for leaving the counter out of the I/O APIC.
*/
-#ifdef DEV_APM
/*
* We can not use the TSC if we support APM. Precise timekeeping
* on an APM'ed machine is at best a fools pursuit, since
@@ -834,13 +833,11 @@ startrtclock()
* We don't know at this point whether APM is going to be used
* or not, nor when it might be activated. Play it safe.
*/
- {
- int disabled = 0;
- resource_int_value("apm", 0, "disabled", &disabled);
- if (disabled == 0)
+ if (power_pm_get_type() == POWER_PM_TYPE_APM) {
+ if (bootverbose)
+ printf("TSC initialization skipped: APM enabled.\n");
return;
}
-#endif /* DEV_APM */
if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 13e11a4315a2..a7aaea0b7a5e 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -49,7 +49,6 @@
*/
#include "opt_clock.h"
-#include "opt_apm.h"
#include "opt_mca.h"
#include <sys/param.h>
@@ -63,6 +62,7 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/cons.h>
+#include <sys/power.h>
#include <machine/clock.h>
#ifdef CLK_CALIBRATION_LOOP
@@ -823,7 +823,6 @@ startrtclock()
* Curse Intel for leaving the counter out of the I/O APIC.
*/
-#ifdef DEV_APM
/*
* We can not use the TSC if we support APM. Precise timekeeping
* on an APM'ed machine is at best a fools pursuit, since
@@ -834,13 +833,11 @@ startrtclock()
* We don't know at this point whether APM is going to be used
* or not, nor when it might be activated. Play it safe.
*/
- {
- int disabled = 0;
- resource_int_value("apm", 0, "disabled", &disabled);
- if (disabled == 0)
+ if (power_pm_get_type() == POWER_PM_TYPE_APM) {
+ if (bootverbose)
+ printf("TSC initialization skipped: APM enabled.\n");
return;
}
-#endif /* DEV_APM */
if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;