FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 06-03-2008, 11:37 PM
Alok Kataria
 
Default x86: read_tsc sync

OriginalAuthor: Ingo Molnar <mingo@elte.hu>
Commit: f06e4ec1c15691b0cfd2397ae32214fa36c90d71

make native_read_tsc() always non-speculative.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
---
include/asm-x86/msr.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index 80b0270..34038c0 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -13,6 +13,7 @@
#ifndef __ASSEMBLY__

#include <asm/errno.h>
+#include <asm/system.h>

static inline unsigned long long native_read_msr(unsigned int msr)
{
@@ -69,7 +70,11 @@ static inline int native_write_msr_safe(unsigned int msr,
static inline unsigned long long native_read_tsc(void)
{
unsigned long long val;
+
+ rdtsc_barrier();
asm volatile("rdtsc" : "=A" (val));
+ rdtsc_barrier();
+
return val;
}

--
1.5.4




--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 07:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org