aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/power/cpu_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/power/cpu_32.c')
-rw-r--r--arch/x86/power/cpu_32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c
index 02f36f53558c..274d06082f48 100644
--- a/arch/x86/power/cpu_32.c
+++ b/arch/x86/power/cpu_32.c
@@ -46,7 +46,7 @@ static void __save_processor_state(struct saved_context *ctxt)
46 ctxt->cr0 = read_cr0(); 46 ctxt->cr0 = read_cr0();
47 ctxt->cr2 = read_cr2(); 47 ctxt->cr2 = read_cr2();
48 ctxt->cr3 = read_cr3(); 48 ctxt->cr3 = read_cr3();
49 ctxt->cr4 = read_cr4(); 49 ctxt->cr4 = read_cr4_safe();
50} 50}
51 51
52/* Needed by apm.c */ 52/* Needed by apm.c */
@@ -99,7 +99,9 @@ static void __restore_processor_state(struct saved_context *ctxt)
99 /* 99 /*
100 * control registers 100 * control registers
101 */ 101 */
102 write_cr4(ctxt->cr4); 102 /* cr4 was introduced in the Pentium CPU */
103 if (ctxt->cr4)
104 write_cr4(ctxt->cr4);
103 write_cr3(ctxt->cr3); 105 write_cr3(ctxt->cr3);
104 write_cr2(ctxt->cr2); 106 write_cr2(ctxt->cr2);
105 write_cr0(ctxt->cr0); 107 write_cr0(ctxt->cr0);