projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ac40ed
)
x86: quick TSC calibration, improve
author
Ingo Molnar
<mingo@elte.hu>
Thu, 4 Sep 2008 20:47:47 +0000
(22:47 +0200)
committer
Ingo Molnar
<mingo@elte.hu>
Thu, 4 Sep 2008 21:21:57 +0000
(23:21 +0200)
- make sure the final TSC timestamp is reliable too
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/tsc.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kernel/tsc.c
b/arch/x86/kernel/tsc.c
index 839070ba8465bc589aea211946755d695fb0c78d..6dab90f68515a573e710415c038b7b8c32daf9a5 100644
(file)
--- a/
arch/x86/kernel/tsc.c
+++ b/
arch/x86/kernel/tsc.c
@@
-316,6
+316,12
@@
static unsigned long quick_pit_calibrate(void)
}
t2 = get_cycles();
+ /*
+ * Make sure we can rely on the second TSC timestamp:
+ */
+ if (!pit_expect_msb(--expect))
+ goto failed;
+
/*
* Ok, if we get here, then we've seen the
* MSB of the PIT decrement QUICK_PIT_ITERATIONS