Check general TSC presence before doing more specific checks and printfs.
This commit is contained in:
parent
6c9cdb5860
commit
1440de203f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209103
@ -123,6 +123,10 @@ init_TSC(void)
|
|||||||
void
|
void
|
||||||
init_TSC_tc(void)
|
init_TSC_tc(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (!tsc_present)
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can not use the TSC if we support APM. Precise timekeeping
|
* We can not use the TSC if we support APM. Precise timekeeping
|
||||||
* on an APM'ed machine is at best a fools pursuit, since
|
* on an APM'ed machine is at best a fools pursuit, since
|
||||||
@ -152,7 +156,7 @@ init_TSC_tc(void)
|
|||||||
tsc_timecounter.tc_quality = -100;
|
tsc_timecounter.tc_quality = -100;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (tsc_present && tsc_freq != 0 && !tsc_is_broken) {
|
if (tsc_freq != 0 && !tsc_is_broken) {
|
||||||
tsc_timecounter.tc_frequency = tsc_freq;
|
tsc_timecounter.tc_frequency = tsc_freq;
|
||||||
tc_init(&tsc_timecounter);
|
tc_init(&tsc_timecounter);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user