diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-09-03 08:14:16 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-09-03 08:14:16 +0000 |
commit | c679c734526b4f611bdeab45a62991e8112bd4cc (patch) | |
tree | 987c4f85015df65062764100ebde7b431569e87a /sys/kern | |
parent | 753374dad4f87f0c45fcfad64bdcbd8916d314c3 (diff) | |
download | src-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.c | 16 |
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; |