Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79932
b: refs/heads/master
c: 56ec1dd
h: refs/heads/master
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Jan 30, 2008
1 parent 54f63bb commit 3465216
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9dcda5ce46c395c5c99003e259e1973dface640
refs/heads/master: 56ec1ddcff967e51d98427e4efcbfc90de67efe3
17 changes: 9 additions & 8 deletions trunk/include/asm-x86/msr.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static inline unsigned long long native_read_tscp(int *aux)
#ifdef __KERNEL__
#ifndef __ASSEMBLY__

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

static inline unsigned long long native_read_msr(unsigned int msr)
Expand All @@ -48,14 +49,14 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr,
{
unsigned long long val;

asm volatile("2: rdmsr ; xorl %0,%0\n"
asm volatile("2: rdmsr ; xor %0,%0\n"
"1:\n\t"
".section .fixup,\"ax\"\n\t"
"3: movl %3,%0 ; jmp 1b\n\t"
"3: mov %3,%0 ; jmp 1b\n\t"
".previous\n\t"
".section __ex_table,\"a\"\n"
" .align 4\n\t"
" .long 2b,3b\n\t"
_ASM_ALIGN "\n\t"
_ASM_PTR " 2b,3b\n\t"
".previous"
: "=r" (*err), "=A" (val)
: "c" (msr), "i" (-EFAULT));
Expand All @@ -73,14 +74,14 @@ static inline int native_write_msr_safe(unsigned int msr,
unsigned low, unsigned high)
{
int err;
asm volatile("2: wrmsr ; xorl %0,%0\n"
asm volatile("2: wrmsr ; xor %0,%0\n"
"1:\n\t"
".section .fixup,\"ax\"\n\t"
"3: movl %4,%0 ; jmp 1b\n\t"
"3: mov %4,%0 ; jmp 1b\n\t"
".previous\n\t"
".section __ex_table,\"a\"\n"
" .align 4\n\t"
" .long 2b,3b\n\t"
_ASM_ALIGN "\n\t"
_ASM_PTR " 2b,3b\n\t"
".previous"
: "=a" (err)
: "c" (msr), "0" (low), "d" (high),
Expand Down

0 comments on commit 3465216

Please sign in to comment.