Use the quality to disable timecounters for which we deem Hz too low.
This commit is contained in:
parent
753374dad4
commit
c679c73452
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user