1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/linkage.h>
3 #include <linux/errno.h>
9 * int {rdmsr,wrmsr}_safe_regs(u32 gprs[8]);
11 * reg layout: u32 gprs[eax, ecx, edx, ebx, esp, ebp, esi, edi]
14 .macro op_safe_regs op
15 ENTRY(\op\()_safe_regs)
18 movq %rdi, %r10 /* Save pointer */
19 xorl %r11d, %r11d /* Return value */
29 movl %r11d, %eax /* Return value */
44 ENDPROC(\op\()_safe_regs)
49 .macro op_safe_regs op
50 ENTRY(\op\()_safe_regs)
55 pushl $0 /* Return value */
86 ENDPROC(\op\()_safe_regs)