[PATCH] Fix x86_64/msr.h interface to agree with i386/msr.h
authorJacob.Shin@amd.com <Jacob.Shin@amd.com>
Sun, 20 Nov 2005 17:49:07 +0000 (18:49 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 20 Nov 2005 19:52:59 +0000 (11:52 -0800)
Ever since we remove msr.c from x86_64 branch and started grabbing it from
i386, msr device (read functionality) has been broken for us.

This is due to the differences between asm-i386/msr.h and asm-x86_64/msr.h interfaces.

Here is a patch to our side to fix this.

Thankfully, as of current (2.6.15-rc1-git6) tree, arch/i386/kernel/msr.c is the only file that uses rdmsr_safe macro.

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-x86_64/msr.h

index 24dc39651bc4780d5f1166e49d31c7bbfa328503..10f8b51cec8ba3e76dadcfd74a3955d7c7e350ba 100644 (file)
@@ -56,7 +56,7 @@
                       ".section __ex_table,\"a\"\n"            \
                       " .align 8\n"                            \
                       " .quad 1b,3b\n"                         \
-                      ".previous":"=&bDS" (ret__), "=a"(a), "=d"(b)\
+                      ".previous":"=&bDS" (ret__), "=a"(*(a)), "=d"(*(b))\
                       :"c"(msr), "i"(-EIO), "0"(0));           \
          ret__; })