summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2012-03-27 07:04:34 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2012-03-27 07:04:34 +0000
commit66e4547bc0aa57d25b6b1f30ed4515d196f51677 (patch)
tree1d60bb98729658bdaaaab280cb4f05893f04d447 /sys/arch
parentb74f031094ba7c74fef80101c104faa1c33cdefd (diff)
only attempt to calculate bus_clock if we can't get tables from acpi
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/est.c13
-rw-r--r--sys/arch/i386/i386/est.c17
2 files changed, 18 insertions, 12 deletions
diff --git a/sys/arch/amd64/amd64/est.c b/sys/arch/amd64/amd64/est.c
index 88ebe98cdfe..f000cb98d96 100644
--- a/sys/arch/amd64/amd64/est.c
+++ b/sys/arch/amd64/amd64/est.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: est.c,v 1.27 2012/03/19 00:49:08 jsg Exp $ */
+/* $OpenBSD: est.c,v 1.28 2012/03/27 07:04:33 jsg Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
@@ -341,10 +341,13 @@ est_init(struct cpu_info *ci)
#if NACPICPU > 0
est_fqlist = est_acpi_init();
#endif
- if (ci->ci_family == 0xf) {
- p4_get_bus_clock(ci);
- } else if (ci->ci_family == 6) {
- p3_get_bus_clock(ci);
+
+ /* bus_clock is only used if we can't get values from ACPI */
+ if (est_fqlist == NULL) {
+ if (ci->ci_family == 0xf)
+ p4_get_bus_clock(ci);
+ else if (ci->ci_family == 6)
+ p3_get_bus_clock(ci);
}
/*
diff --git a/sys/arch/i386/i386/est.c b/sys/arch/i386/i386/est.c
index fd6cd4a4121..ac25b554cdd 100644
--- a/sys/arch/i386/i386/est.c
+++ b/sys/arch/i386/i386/est.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: est.c,v 1.38 2012/03/27 06:44:01 jsg Exp $ */
+/* $OpenBSD: est.c,v 1.39 2012/03/27 07:04:33 jsg Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
@@ -1077,12 +1077,15 @@ est_init(struct cpu_info *ci, int vendor)
est_fqlist = est_acpi_init();
#endif
- if (vendor == CPUVENDOR_VIA)
- cyrix3_get_bus_clock(ci);
- else if (ci->ci_family == 0xf)
- p4_get_bus_clock(ci);
- else if (ci->ci_family == 6)
- p3_get_bus_clock(ci);
+ /* bus_clock is only used if we can't get values from ACPI */
+ if (est_fqlist == NULL) {
+ if (vendor == CPUVENDOR_VIA)
+ cyrix3_get_bus_clock(ci);
+ else if (ci->ci_family == 0xf)
+ p4_get_bus_clock(ci);
+ else if (ci->ci_family == 6)
+ p3_get_bus_clock(ci);
+ }
/*
* Interpreting the values of PERF_STATUS is not valid