diff options
Diffstat (limited to 'arch/x86/kernel/tsc_sync.c')
-rw-r--r-- | arch/x86/kernel/tsc_sync.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c index d0db011051a5..728f75378475 100644 --- a/arch/x86/kernel/tsc_sync.c +++ b/arch/x86/kernel/tsc_sync.c | |||
@@ -286,13 +286,6 @@ void check_tsc_sync_source(int cpu) | |||
286 | if (unsynchronized_tsc()) | 286 | if (unsynchronized_tsc()) |
287 | return; | 287 | return; |
288 | 288 | ||
289 | if (tsc_clocksource_reliable) { | ||
290 | if (cpu == (nr_cpu_ids-1) || system_state != SYSTEM_BOOTING) | ||
291 | pr_info( | ||
292 | "Skipped synchronization checks as TSC is reliable.\n"); | ||
293 | return; | ||
294 | } | ||
295 | |||
296 | /* | 289 | /* |
297 | * Set the maximum number of test runs to | 290 | * Set the maximum number of test runs to |
298 | * 1 if the CPU does not provide the TSC_ADJUST MSR | 291 | * 1 if the CPU does not provide the TSC_ADJUST MSR |
@@ -380,14 +373,19 @@ void check_tsc_sync_target(void) | |||
380 | int cpus = 2; | 373 | int cpus = 2; |
381 | 374 | ||
382 | /* Also aborts if there is no TSC. */ | 375 | /* Also aborts if there is no TSC. */ |
383 | if (unsynchronized_tsc() || tsc_clocksource_reliable) | 376 | if (unsynchronized_tsc()) |
384 | return; | 377 | return; |
385 | 378 | ||
386 | /* | 379 | /* |
387 | * Store, verify and sanitize the TSC adjust register. If | 380 | * Store, verify and sanitize the TSC adjust register. If |
388 | * successful skip the test. | 381 | * successful skip the test. |
382 | * | ||
383 | * The test is also skipped when the TSC is marked reliable. This | ||
384 | * is true for SoCs which have no fallback clocksource. On these | ||
385 | * SoCs the TSC is frequency synchronized, but still the TSC ADJUST | ||
386 | * register might have been wreckaged by the BIOS.. | ||
389 | */ | 387 | */ |
390 | if (tsc_store_and_check_tsc_adjust(false)) { | 388 | if (tsc_store_and_check_tsc_adjust(false) || tsc_clocksource_reliable) { |
391 | atomic_inc(&skip_test); | 389 | atomic_inc(&skip_test); |
392 | return; | 390 | return; |
393 | } | 391 | } |