summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2004-09-30 14:30:29 +0000
committerkensmith <kensmith@FreeBSD.org>2004-09-30 14:30:29 +0000
commitc445431dd64a4925befe57d5160b18c9b5c72c68 (patch)
tree5a6839a2d383fc89035d086afa61c9f7096297a1 /sys/sparc64
parente80e8663415abe516e7f18ac7eb8954dabc29ded (diff)
downloadFreeBSD-src-c445431dd64a4925befe57d5160b18c9b5c72c68.zip
FreeBSD-src-c445431dd64a4925befe57d5160b18c9b5c72c68.tar.gz
Set the tc_quality field of the struct before calling tc_init(), since
the structure space had been obtained from malloc() its contents is random garbage. The choice of value being set is part of a larger effort to solve some timecounter issues on MP machines (while working on that we noticed this problem). Noticed by: marius Reviewed by: marius, green MFC after: 3 days
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/counter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/counter.c b/sys/sparc64/sparc64/counter.c
index ea65497..3e93465 100644
--- a/sys/sparc64/sparc64/counter.c
+++ b/sys/sparc64/sparc64/counter.c
@@ -37,6 +37,7 @@
#define COUNTER_MASK ((1 << 29) - 1)
#define COUNTER_FREQ 1000000
+#define COUNTER_QUALITY 100
/* Bits in the limit register. */
#define CTLR_INTEN (1U << 31) /* Enable timer interrupts */
@@ -94,6 +95,7 @@ sparc64_counter_init(bus_space_tag_t tag, bus_space_handle_t handle,
tc->tc_frequency = COUNTER_FREQ;
tc->tc_name = "counter-timer";
tc->tc_priv = sc;
+ tc->tc_quality = COUNTER_QUALITY;
tc_init(tc);
}
OpenPOWER on IntegriCloud