1 #include <linux/linkage.h>
2 #include <linux/errno.h>
8 * int {rdmsr,wrmsr}_safe_regs(u32 gprs[8]);
10 * reg layout: u32 gprs[eax, ecx, edx, ebx, esp, ebp, esi, edi]
13 .macro op_safe_regs op
14 ENTRY(\op\()_safe_regs)
17 movq %rdi, %r10 /* Save pointer */
18 xorl %r11d, %r11d /* Return value */
28 movl %r11d, %eax /* Return value */
43 ENDPROC(\op\()_safe_regs)
48 .macro op_safe_regs op
49 ENTRY(\op\()_safe_regs)
54 pushl $0 /* Return value */
85 ENDPROC(\op\()_safe_regs)