diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 2a34aaf3c8f1..33120100ff5e 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -48,9 +48,20 @@ int x86_acpi_suspend_lowlevel(void) | |||
48 | #ifndef CONFIG_64BIT | 48 | #ifndef CONFIG_64BIT |
49 | native_store_gdt((struct desc_ptr *)&header->pmode_gdt); | 49 | native_store_gdt((struct desc_ptr *)&header->pmode_gdt); |
50 | 50 | ||
51 | /* | ||
52 | * We have to check that we can write back the value, and not | ||
53 | * just read it. At least on 90 nm Pentium M (Family 6, Model | ||
54 | * 13), reading an invalid MSR is not guaranteed to trap, see | ||
55 | * Erratum X4 in "Intel Pentium M Processor on 90 nm Process | ||
56 | * with 2-MB L2 Cache and IntelĀ® Processor A100 and A110 on 90 | ||
57 | * nm process with 512-KB L2 Cache Specification Update". | ||
58 | */ | ||
51 | if (!rdmsr_safe(MSR_EFER, | 59 | if (!rdmsr_safe(MSR_EFER, |
52 | &header->pmode_efer_low, | 60 | &header->pmode_efer_low, |
53 | &header->pmode_efer_high)) | 61 | &header->pmode_efer_high) && |
62 | !wrmsr_safe(MSR_EFER, | ||
63 | header->pmode_efer_low, | ||
64 | header->pmode_efer_high)) | ||
54 | header->pmode_behavior |= (1 << WAKEUP_BEHAVIOR_RESTORE_EFER); | 65 | header->pmode_behavior |= (1 << WAKEUP_BEHAVIOR_RESTORE_EFER); |
55 | #endif /* !CONFIG_64BIT */ | 66 | #endif /* !CONFIG_64BIT */ |
56 | 67 | ||
@@ -61,7 +72,10 @@ int x86_acpi_suspend_lowlevel(void) | |||
61 | } | 72 | } |
62 | if (!rdmsr_safe(MSR_IA32_MISC_ENABLE, | 73 | if (!rdmsr_safe(MSR_IA32_MISC_ENABLE, |
63 | &header->pmode_misc_en_low, | 74 | &header->pmode_misc_en_low, |
64 | &header->pmode_misc_en_high)) | 75 | &header->pmode_misc_en_high) && |
76 | !wrmsr_safe(MSR_IA32_MISC_ENABLE, | ||
77 | header->pmode_misc_en_low, | ||
78 | header->pmode_misc_en_high)) | ||
65 | header->pmode_behavior |= | 79 | header->pmode_behavior |= |
66 | (1 << WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE); | 80 | (1 << WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE); |
67 | header->realmode_flags = acpi_realmode_flags; | 81 | header->realmode_flags = acpi_realmode_flags; |