aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/paravirt.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:32:07 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:32:07 -0500
commit4a8c4c4e10d1bc2c3bd80caabb6a76a66849f7e8 (patch)
treeb93a8cef2dd647128cea3d28bf86bc97eaff074f /include/asm-x86/paravirt.h
parent2e47d3e6c35bb5b78fea2b2584c7eeaf782f138d (diff)
x86: add macro for privileged 64-bit operation
i386 has a macro GET_CR0_INTO_EAX, used in early trap handling code. x86_64 has similar needs, only it needs to put cr2 into rcx. We provide a macro for such task, in the same way Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/paravirt.h')
-rw-r--r--include/asm-x86/paravirt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index 0735a90f531b..7d1c126e2249 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -1227,6 +1227,12 @@ static inline unsigned long __raw_local_irq_save(void)
1227 push %ecx; push %edx; \ 1227 push %ecx; push %edx; \
1228 call *pv_cpu_ops+PV_CPU_read_cr0; \ 1228 call *pv_cpu_ops+PV_CPU_read_cr0; \
1229 pop %edx; pop %ecx 1229 pop %edx; pop %ecx
1230#else
1231#define GET_CR2_INTO_RCX \
1232 call *pv_mmu_ops+PV_MMU_read_cr2; \
1233 movq %rax, %rcx; \
1234 xorq %rax, %rax;
1235
1230#endif 1236#endif
1231 1237
1232#endif /* __ASSEMBLY__ */ 1238#endif /* __ASSEMBLY__ */