aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-09-03 08:14:16 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-09-03 08:14:16 +0000
commitc679c734526b4f611bdeab45a62991e8112bd4cc (patch)
tree987c4f85015df65062764100ebde7b431569e87a /sys/kern
parent753374dad4f87f0c45fcfad64bdcbd8916d314c3 (diff)
downloadsrc-c679c734526b4f611bdeab45a62991e8112bd4cc.tar.gz
src-c679c734526b4f611bdeab45a62991e8112bd4cc.zip
Use the quality to disable timecounters for which we deem Hz too low.
Notes
Notes: svn path=/head/; revision=119716
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_tc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index e0a6e1571016..1984d5605e48 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -288,16 +288,20 @@ tc_init(struct timecounter *tc)
{
unsigned u;
- if (tc->tc_quality >= 0 || bootverbose)
+ u = tc->tc_frequency / tc->tc_counter_mask;
+ if (u > hz && tc->tc_quality >= 0) {
+ tc->tc_quality = -2000;
+ if (bootverbose) {
+ printf("Timecounter \"%s\" frequency %ju Hz",
+ tc->tc_name, (intmax_t)tc->tc_frequency);
+ printf(" -- Insufficient hz, needs at least %u\n", u);
+ }
+ } else if (tc->tc_quality >= 0 || bootverbose) {
printf("Timecounter \"%s\" frequency %ju Hz quality %d",
tc->tc_name, (intmax_t)tc->tc_frequency,
tc->tc_quality);
-
- u = tc->tc_frequency / tc->tc_counter_mask;
- if (u > hz) {
- printf(" -- Insufficient hz, needs at least %u\n", u);
- return;
}
+
printf("\n");
tc->tc_next = timecounters;
timecounters = tc;