summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2001-11-01 16:34:07 +0000
committeriwasaki <iwasaki@FreeBSD.org>2001-11-01 16:34:07 +0000
commitf1842a13d838c3a94044961bbf70910f54a49956 (patch)
tree386182cbb6b07e9a3fa20ca8415118c34d61ecae /sys/isa
parent9440591aaa9e7f2d8ef542a245eb93b2c2547844 (diff)
downloadFreeBSD-src-f1842a13d838c3a94044961bbf70910f54a49956.zip
FreeBSD-src-f1842a13d838c3a94044961bbf70910f54a49956.tar.gz
Some fix for the recent apm module changes.
- Now that apm loadable module can inform its existence to other kernel components (e.g. i386/isa/clock.c:startrtclock()'s TCS hack). - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose. - Add simple arbitration mechanism for APM vs. ACPI. This prevents the kernel enables both of them. - Remove obsolete `#ifdef DEV_APM' related code. - Add abstracted interface for Powermanagement operations. Public apm(4) functions, such as apm_suspend(), should be replaced new interfaces. Currently only power_pm_suspend (successor of apm_suspend) is implemented. Reviewed by: peter, arch@ and audit@
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/atrtc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 13e11a4..a7aaea0 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.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;
OpenPOWER on IntegriCloud