From 1440de203fc61243e639318e551645f626a268ce Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 12 Jun 2010 13:10:03 +0000 Subject: [PATCH] Check general TSC presence before doing more specific checks and printfs. --- sys/i386/i386/tsc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 95f87f5bcde4..d0f7072f8161 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -123,6 +123,10 @@ init_TSC(void) void init_TSC_tc(void) { + + if (!tsc_present) + return; + /* * We can not use the TSC if we support APM. Precise timekeeping * 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; #endif - if (tsc_present && tsc_freq != 0 && !tsc_is_broken) { + if (tsc_freq != 0 && !tsc_is_broken) { tsc_timecounter.tc_frequency = tsc_freq; tc_init(&tsc_timecounter); }