From 1cd0a9170c1aac674cb7e5780bcf8533f929ff07 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 18 Apr 2012 17:16:48 -0700 Subject: [PATCH] --- yaml --- r: 305434 b: refs/heads/master c: ffc4bc9c6fa4eaf935d96d139bfa7443cac0b88e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/paravirt.h | 6 ++---- trunk/arch/x86/kernel/head_64.S | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 6bcb883b6f6a..4844153ff972 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 84f4fc524eed040660bd4ebc8cba259d8afe8461 +refs/heads/master: ffc4bc9c6fa4eaf935d96d139bfa7443cac0b88e diff --git a/trunk/arch/x86/include/asm/paravirt.h b/trunk/arch/x86/include/asm/paravirt.h index aa0f91308367..6cbbabf52707 100644 --- a/trunk/arch/x86/include/asm/paravirt.h +++ b/trunk/arch/x86/include/asm/paravirt.h @@ -1023,10 +1023,8 @@ extern void default_banner(void); call PARA_INDIRECT(pv_cpu_ops+PV_CPU_swapgs) \ ) -#define GET_CR2_INTO_RCX \ - call PARA_INDIRECT(pv_mmu_ops+PV_MMU_read_cr2); \ - movq %rax, %rcx; \ - xorq %rax, %rax; +#define GET_CR2_INTO_RAX \ + call PARA_INDIRECT(pv_mmu_ops+PV_MMU_read_cr2) #define PARAVIRT_ADJUST_EXCEPTION_FRAME \ PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_adjust_exception_frame), \ diff --git a/trunk/arch/x86/kernel/head_64.S b/trunk/arch/x86/kernel/head_64.S index adf52e85d551..d1e112c8b577 100644 --- a/trunk/arch/x86/kernel/head_64.S +++ b/trunk/arch/x86/kernel/head_64.S @@ -23,8 +23,9 @@ #ifdef CONFIG_PARAVIRT #include #include +#define GET_CR2_INTO(reg) GET_CR2_INTO_RAX ; movq %rax, reg #else -#define GET_CR2_INTO_RCX movq %cr2, %rcx +#define GET_CR2_INTO(reg) movq %cr2, reg #endif /* we are not able to switch in one step to the final KERNEL ADDRESS SPACE @@ -286,8 +287,7 @@ ENTRY(early_idt_handler) cmpl $2,early_recursion_flag(%rip) jz 1f incl early_recursion_flag(%rip) - GET_CR2_INTO_RCX - movq %rcx,%r9 + GET_CR2_INTO(%r9) xorl %r8d,%r8d # zero for error code movl %esi,%ecx # get vector number # Test %ecx against mask of vectors that push error code.