summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-07-30 21:05:22 +0000
committerphk <phk@FreeBSD.org>2000-07-30 21:05:22 +0000
commitc4e079d075d1f3b37bcabbc448dba06bf20dd2b6 (patch)
tree13fd2f4aa7dbf2c0159da0c26a003a79c813dff5 /sys/amd64
parent8bfb4dc90b5fa35b464ac11103cd688400b2f907 (diff)
downloadFreeBSD-src-c4e079d075d1f3b37bcabbc448dba06bf20dd2b6.zip
FreeBSD-src-c4e079d075d1f3b37bcabbc448dba06bf20dd2b6.tar.gz
Allow use of TSC even if APM is compiled in but disabled.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/tsc.c7
-rw-r--r--sys/amd64/isa/clock.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 344d39f..15044ab 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -819,7 +819,12 @@ 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.
*/
- return;
+ {
+ int disabled = 0;
+ resource_int_value("apm", 0, "disabled", &disabled);
+ if (disabled == 0)
+ return;
+ }
#endif /* NAPM > 0 */
if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 344d39f..15044ab 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -819,7 +819,12 @@ 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.
*/
- return;
+ {
+ int disabled = 0;
+ resource_int_value("apm", 0, "disabled", &disabled);
+ if (disabled == 0)
+ return;
+ }
#endif /* NAPM > 0 */
if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
OpenPOWER on IntegriCloud