|
@@ -1297,7 +1297,7 @@ void setup_local_APIC(void)
|
|
unsigned int value, queued;
|
|
unsigned int value, queued;
|
|
int i, j, acked = 0;
|
|
int i, j, acked = 0;
|
|
unsigned long long tsc = 0, ntsc;
|
|
unsigned long long tsc = 0, ntsc;
|
|
- long long max_loops = cpu_khz;
|
|
|
|
|
|
+ long long max_loops = cpu_khz ? cpu_khz : 1000000;
|
|
|
|
|
|
if (cpu_has_tsc)
|
|
if (cpu_has_tsc)
|
|
rdtscll(tsc);
|
|
rdtscll(tsc);
|
|
@@ -1383,7 +1383,7 @@ void setup_local_APIC(void)
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
if (queued) {
|
|
if (queued) {
|
|
- if (cpu_has_tsc) {
|
|
|
|
|
|
+ if (cpu_has_tsc && cpu_khz) {
|
|
rdtscll(ntsc);
|
|
rdtscll(ntsc);
|
|
max_loops = (cpu_khz << 10) - (ntsc - tsc);
|
|
max_loops = (cpu_khz << 10) - (ntsc - tsc);
|
|
} else
|
|
} else
|