Check general TSC presence before doing more specific checks and printfs.

This commit is contained in:
mav 2010-06-12 13:10:03 +00:00
parent d7eaa4520b
commit b0d57d4b56

View File

@ -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);
} }