summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-21 22:28:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-21 22:28:57 +0000
commit07e974d1668eff2980412a4659ac3bf98b6f268f (patch)
tree0c27b7623aebc643afee9bdafbfcd4049719b3b0 /sys
parent6aa28c5f48a5999e15e3d510c19e367409991faf (diff)
Only attach timer to the first counter-timer found.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/sparc64/clock.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c
index af8d2d962fc..655cac1827a 100644
--- a/sys/arch/sparc64/sparc64/clock.c
+++ b/sys/arch/sparc64/sparc64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.24 2006/06/20 20:31:32 miod Exp $ */
+/* $OpenBSD: clock.c,v 1.25 2006/06/21 22:28:56 miod Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
@@ -573,7 +573,10 @@ timermatch(parent, cf, aux)
{
struct mainbus_attach_args *ma = aux;
- return (strcmp("counter-timer", ma->ma_name) == 0);
+ if (!timerreg_4u.t_timer || !timerreg_4u.t_clrintr)
+ return (strcmp("counter-timer", ma->ma_name) == 0);
+ else
+ return (0);
}
static void
@@ -709,7 +712,6 @@ cpu_initclocks()
*/
if (!timerreg_4u.t_timer || !timerreg_4u.t_clrintr) {
-
printf("No counter-timer -- using %%tick at %ldMHz as "
"system clock.\n", (long)(cpu_clockrate/1000000));
/* We don't have a counter-timer -- use %tick */