]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86: shift bits the right way in native_read_tscp
authorMax Asbock <masbock@us.ibm.com>
Mon, 30 Jun 2008 16:17:09 +0000 (18:17 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Jul 2008 03:46:16 +0000 (20:46 -0700)
Commit 41aefdcc98fdba47459eab67630293d67e855fc3 upstream

x86: shift bits the right way in native_read_tscp

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>
Acked-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/asm-x86/msr.h

index 3ca29ebebbb18dd8f7547eab749a94f0ce157874..84a15b6977cc1d9ff5632d1d8461df9c3302755f 100644 (file)
@@ -18,7 +18,7 @@ static inline unsigned long long native_read_tscp(unsigned int *aux)
        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);
 }
 
 /*