Pull bugzilla-5452 into release branch
[pandora-kernel.git] / arch / i386 / power / cpu.c
index b27c5ac..79b2370 100644 (file)
@@ -51,16 +51,14 @@ void save_processor_state(void)
        __save_processor_state(&saved_context);
 }
 
-static void
-do_fpu_end(void)
+static void do_fpu_end(void)
 {
-        /* restore FPU regs if necessary */
-       /* Do it out of line so that gcc does not move cr0 load to some stupid place */
-        kernel_fpu_end();
-       mxcsr_feature_mask_init();
+       /*
+        * Restore FPU regs if necessary.
+        */
+       kernel_fpu_end();
 }
 
-
 static void fix_processor_context(void)
 {
        int cpu = smp_processor_id();
@@ -94,7 +92,7 @@ void __restore_processor_state(struct saved_context *ctxt)
        write_cr4(ctxt->cr4);
        write_cr3(ctxt->cr3);
        write_cr2(ctxt->cr2);
-       write_cr2(ctxt->cr0);
+       write_cr0(ctxt->cr0);
 
        /*
         * now restore the descriptor tables to their proper values
@@ -120,6 +118,7 @@ void __restore_processor_state(struct saved_context *ctxt)
        fix_processor_context();
        do_fpu_end();
        mtrr_ap_init();
+       mcheck_init(&boot_cpu_data);
 }
 
 void restore_processor_state(void)