提交 7d24a827 编写于 作者: H H. Peter Anvin 提交者: Ingo Molnar

x86: use _ASM_EXTABLE macro in include/asm-x86/msr.h

Use the _ASM_EXTABLE macro from <asm/asm.h>, instead of open-coding
__ex_table entires in include/asm-x86/msr.h.
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 92c37fa3
...@@ -57,10 +57,7 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr, ...@@ -57,10 +57,7 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr,
".section .fixup,\"ax\"\n\t" ".section .fixup,\"ax\"\n\t"
"3: mov %3,%0 ; jmp 1b\n\t" "3: mov %3,%0 ; jmp 1b\n\t"
".previous\n\t" ".previous\n\t"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(2b,3b)
_ASM_ALIGN "\n\t"
_ASM_PTR " 2b,3b\n\t"
".previous"
: "=r" (*err), EAX_EDX_RET(val, low, high) : "=r" (*err), EAX_EDX_RET(val, low, high)
: "c" (msr), "i" (-EFAULT)); : "c" (msr), "i" (-EFAULT));
return EAX_EDX_VAL(val, low, high); return EAX_EDX_VAL(val, low, high);
...@@ -81,10 +78,7 @@ static inline int native_write_msr_safe(unsigned int msr, ...@@ -81,10 +78,7 @@ static inline int native_write_msr_safe(unsigned int msr,
".section .fixup,\"ax\"\n\t" ".section .fixup,\"ax\"\n\t"
"3: mov %4,%0 ; jmp 1b\n\t" "3: mov %4,%0 ; jmp 1b\n\t"
".previous\n\t" ".previous\n\t"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(2b,3b)
_ASM_ALIGN "\n\t"
_ASM_PTR " 2b,3b\n\t"
".previous"
: "=a" (err) : "=a" (err)
: "c" (msr), "0" (low), "d" (high), : "c" (msr), "0" (low), "d" (high),
"i" (-EFAULT)); "i" (-EFAULT));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册