浏览代码

x86: add warning to check_tsc_warp()

add warning to check_tsc_warp() - if get_cycles() does not progress.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Ingo Molnar 17 年之前
父节点
当前提交
ad8ca495bd
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      arch/x86/kernel/tsc_sync.c

+ 5 - 1
arch/x86/kernel/tsc_sync.c

@@ -87,7 +87,11 @@ static __cpuinit void check_tsc_warp(void)
 			nr_warps++;
 			__raw_spin_unlock(&sync_lock);
 		}
-
+	}
+	if (!(now-start)) {
+		printk("Warning: zero tsc calibration delta: %Ld [max: %Ld]\n",
+			now-start, end-start);
+		WARN_ON(1);
 	}
 }