[PATCH] x86-64: Add EFER to the register set saved by save_processor_state
[deliverable/linux.git] / arch / x86_64 / kernel / suspend.c
index 91f7e678bae72e7f5e951919633ff15d6f12451a..fe865ea4df52c3dfaf29e36884d1554094596d90 100644 (file)
@@ -33,7 +33,6 @@ void __save_processor_state(struct saved_context *ctxt)
        asm volatile ("str %0"  : "=m" (ctxt->tr));
 
        /* XMM0..XMM15 should be handled by kernel_fpu_begin(). */
-       /* EFER should be constant for kernel version, no need to handle it. */
        /*
         * segment registers
         */
@@ -50,6 +49,7 @@ void __save_processor_state(struct saved_context *ctxt)
        /*
         * control registers 
         */
+       rdmsrl(MSR_EFER, ctxt->efer);
        asm volatile ("movq %%cr0, %0" : "=r" (ctxt->cr0));
        asm volatile ("movq %%cr2, %0" : "=r" (ctxt->cr2));
        asm volatile ("movq %%cr3, %0" : "=r" (ctxt->cr3));
@@ -75,6 +75,7 @@ void __restore_processor_state(struct saved_context *ctxt)
        /*
         * control registers
         */
+       wrmsrl(MSR_EFER, ctxt->efer);
        asm volatile ("movq %0, %%cr8" :: "r" (ctxt->cr8));
        asm volatile ("movq %0, %%cr4" :: "r" (ctxt->cr4));
        asm volatile ("movq %0, %%cr3" :: "r" (ctxt->cr3));
This page took 0.025127 seconds and 5 git commands to generate.