Commit 643bec95 authored by Ingo Molnar's avatar Ingo Molnar

x86: clean up arch/x86/kernel/tsc_sync.c a bit

 - remove unused define
 - make the lock variable definition stand out some more
 - convert KERN_* to pr_info() / pr_warning()

[ Impact: cleanup ]

LKML-Reference: <new-submission>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 975e5f45
...@@ -34,6 +34,7 @@ static __cpuinitdata atomic_t stop_count; ...@@ -34,6 +34,7 @@ static __cpuinitdata atomic_t stop_count;
* of a critical section, to be able to prove TSC time-warps: * of a critical section, to be able to prove TSC time-warps:
*/ */
static __cpuinitdata raw_spinlock_t sync_lock = __RAW_SPIN_LOCK_UNLOCKED; static __cpuinitdata raw_spinlock_t sync_lock = __RAW_SPIN_LOCK_UNLOCKED;
static __cpuinitdata cycles_t last_tsc; static __cpuinitdata cycles_t last_tsc;
static __cpuinitdata cycles_t max_warp; static __cpuinitdata cycles_t max_warp;
static __cpuinitdata int nr_warps; static __cpuinitdata int nr_warps;
...@@ -113,13 +114,12 @@ void __cpuinit check_tsc_sync_source(int cpu) ...@@ -113,13 +114,12 @@ void __cpuinit check_tsc_sync_source(int cpu)
return; return;
if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) { if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) {
printk(KERN_INFO pr_info("Skipping synchronization checks as TSC is reliable.\n");
"Skipping synchronization checks as TSC is reliable.\n");
return; return;
} }
printk(KERN_INFO "checking TSC synchronization [CPU#%d -> CPU#%d]:", pr_info("checking TSC synchronization [CPU#%d -> CPU#%d]:",
smp_processor_id(), cpu); smp_processor_id(), cpu);
/* /*
* Reset it - in case this is a second bootup: * Reset it - in case this is a second bootup:
...@@ -143,8 +143,8 @@ void __cpuinit check_tsc_sync_source(int cpu) ...@@ -143,8 +143,8 @@ void __cpuinit check_tsc_sync_source(int cpu)
if (nr_warps) { if (nr_warps) {
printk("\n"); printk("\n");
printk(KERN_WARNING "Measured %Ld cycles TSC warp between CPUs," pr_warning("Measured %Ld cycles TSC warp between CPUs, "
" turning off TSC clock.\n", max_warp); "turning off TSC clock.\n", max_warp);
mark_tsc_unstable("check_tsc_sync_source failed"); mark_tsc_unstable("check_tsc_sync_source failed");
} else { } else {
printk(" passed.\n"); printk(" passed.\n");
...@@ -195,5 +195,3 @@ void __cpuinit check_tsc_sync_target(void) ...@@ -195,5 +195,3 @@ void __cpuinit check_tsc_sync_target(void)
while (atomic_read(&stop_count) != cpus) while (atomic_read(&stop_count) != cpus)
cpu_relax(); cpu_relax();
} }
#undef NR_LOOPS
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment