projects
/
GitHub
/
moto-9609
/
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:
7069ed6
)
x86: pvclock: make sure rdtsc doesnt speculate out of region
author
Marcelo Tosatti
<mtosatti@redhat.com>
Wed, 28 Nov 2012 01:28:49 +0000
(23:28 -0200)
committer
Marcelo Tosatti
<mtosatti@redhat.com>
Wed, 28 Nov 2012 01:29:06 +0000
(23:29 -0200)
Originally from Jeremy Fitzhardinge.
pvclock_get_time_values, which contains the memory barriers
will be removed by next patch.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kernel/pvclock.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kernel/pvclock.c
b/arch/x86/kernel/pvclock.c
index 42eb3300dfc6c35630aab267e051678f1a677e59..12e47e210491029d6356a3e819b0750ca3f73d99 100644
(file)
--- a/
arch/x86/kernel/pvclock.c
+++ b/
arch/x86/kernel/pvclock.c
@@
-97,10
+97,10
@@
cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
do {
version = pvclock_get_time_values(&shadow, src);
- barrier();
+
rdtsc_
barrier();
offset = pvclock_get_nsec_offset(&shadow);
ret = shadow.system_timestamp + offset;
- barrier();
+
rdtsc_
barrier();
} while (version != src->version);
if ((valid_flags & PVCLOCK_TSC_STABLE_BIT) &&