diff options
Diffstat (limited to 'arch/x86/power/cpu.c')
-rw-r--r-- | arch/x86/power/cpu.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 6ec7910f59bf..3e32ed5648a0 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c | |||
@@ -105,11 +105,8 @@ static void __save_processor_state(struct saved_context *ctxt) | |||
105 | ctxt->cr0 = read_cr0(); | 105 | ctxt->cr0 = read_cr0(); |
106 | ctxt->cr2 = read_cr2(); | 106 | ctxt->cr2 = read_cr2(); |
107 | ctxt->cr3 = read_cr3(); | 107 | ctxt->cr3 = read_cr3(); |
108 | #ifdef CONFIG_X86_32 | 108 | ctxt->cr4 = __read_cr4_safe(); |
109 | ctxt->cr4 = read_cr4_safe(); | 109 | #ifdef CONFIG_X86_64 |
110 | #else | ||
111 | /* CONFIG_X86_64 */ | ||
112 | ctxt->cr4 = read_cr4(); | ||
113 | ctxt->cr8 = read_cr8(); | 110 | ctxt->cr8 = read_cr8(); |
114 | #endif | 111 | #endif |
115 | ctxt->misc_enable_saved = !rdmsrl_safe(MSR_IA32_MISC_ENABLE, | 112 | ctxt->misc_enable_saved = !rdmsrl_safe(MSR_IA32_MISC_ENABLE, |
@@ -175,12 +172,12 @@ static void notrace __restore_processor_state(struct saved_context *ctxt) | |||
175 | /* cr4 was introduced in the Pentium CPU */ | 172 | /* cr4 was introduced in the Pentium CPU */ |
176 | #ifdef CONFIG_X86_32 | 173 | #ifdef CONFIG_X86_32 |
177 | if (ctxt->cr4) | 174 | if (ctxt->cr4) |
178 | write_cr4(ctxt->cr4); | 175 | __write_cr4(ctxt->cr4); |
179 | #else | 176 | #else |
180 | /* CONFIG X86_64 */ | 177 | /* CONFIG X86_64 */ |
181 | wrmsrl(MSR_EFER, ctxt->efer); | 178 | wrmsrl(MSR_EFER, ctxt->efer); |
182 | write_cr8(ctxt->cr8); | 179 | write_cr8(ctxt->cr8); |
183 | write_cr4(ctxt->cr4); | 180 | __write_cr4(ctxt->cr4); |
184 | #endif | 181 | #endif |
185 | write_cr3(ctxt->cr3); | 182 | write_cr3(ctxt->cr3); |
186 | write_cr2(ctxt->cr2); | 183 | write_cr2(ctxt->cr2); |