lkml.org 
[lkml]   [2008]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] x86: shift bits the right way in native_read_tscp
From
Date
native_read_tscp shifts the bits in the high order value in the wrong direction,
the attached patch fixes that.

Signed-off-by: Max Asbock <masbock@linux.vnet.ibm.com>

diff -pburN linux/include/asm-x86/msr.h linux.rdtscp/include/asm-x86/msr.h
--- linux/include/asm-x86/msr.h 2008-06-20 11:51:17.000000000 -0700
+++ linux.rdtscp/include/asm-x86/msr.h 2008-06-25 14:26:35.000000000 -0700
@@ -18,7 +18,7 @@ static inline unsigned long long native_
unsigned long low, high;
asm volatile(".byte 0x0f,0x01,0xf9"
: "=a" (low), "=d" (high), "=c" (*aux));
- return low | ((u64)high >> 32);
+ return low | ((u64)high << 32);
}

/*

---
Max



\
 
 \ /
  Last update: 2008-06-25 23:49    [W:0.025 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site