Skip to content

Commit

Permalink
x86: shift bits the right way in native_read_tscp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Max Asbock authored and Ingo Molnar committed Jun 26, 2008
1 parent 2849914 commit 41aefdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-x86/msr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 41aefdc

Please sign in to comment.