diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-11 17:19:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-11 17:19:45 -0400 |
commit | 7ae1277a5202109a31d8f81ac99d4a53278dab84 (patch) | |
tree | b32748f82150e4a37b2416ffc2d844cc7d9e7ee5 /arch | |
parent | b25b550bb153626df6a48eb8583e923e3dfcf64a (diff) | |
parent | 85a0e7539781dad4bfcffd98e72fa9f130f4e40d (diff) |
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / x86: Save/restore MISC_ENABLE register
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/suspend_32.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/suspend_64.h | 2 | ||||
-rw-r--r-- | arch/x86/power/cpu.c | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/suspend_32.h b/arch/x86/include/asm/suspend_32.h index 48dcfa62ea07..fd921c3a6841 100644 --- a/arch/x86/include/asm/suspend_32.h +++ b/arch/x86/include/asm/suspend_32.h | |||
@@ -15,6 +15,8 @@ static inline int arch_prepare_suspend(void) { return 0; } | |||
15 | struct saved_context { | 15 | struct saved_context { |
16 | u16 es, fs, gs, ss; | 16 | u16 es, fs, gs, ss; |
17 | unsigned long cr0, cr2, cr3, cr4; | 17 | unsigned long cr0, cr2, cr3, cr4; |
18 | u64 misc_enable; | ||
19 | bool misc_enable_saved; | ||
18 | struct desc_ptr gdt; | 20 | struct desc_ptr gdt; |
19 | struct desc_ptr idt; | 21 | struct desc_ptr idt; |
20 | u16 ldt; | 22 | u16 ldt; |
diff --git a/arch/x86/include/asm/suspend_64.h b/arch/x86/include/asm/suspend_64.h index 06284f42b759..8d942afae681 100644 --- a/arch/x86/include/asm/suspend_64.h +++ b/arch/x86/include/asm/suspend_64.h | |||
@@ -27,6 +27,8 @@ struct saved_context { | |||
27 | u16 ds, es, fs, gs, ss; | 27 | u16 ds, es, fs, gs, ss; |
28 | unsigned long gs_base, gs_kernel_base, fs_base; | 28 | unsigned long gs_base, gs_kernel_base, fs_base; |
29 | unsigned long cr0, cr2, cr3, cr4, cr8; | 29 | unsigned long cr0, cr2, cr3, cr4, cr8; |
30 | u64 misc_enable; | ||
31 | bool misc_enable_saved; | ||
30 | unsigned long efer; | 32 | unsigned long efer; |
31 | u16 gdt_pad; | 33 | u16 gdt_pad; |
32 | u16 gdt_limit; | 34 | u16 gdt_limit; |
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 0a979f3e5b8a..1290ba54b350 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c | |||
@@ -105,6 +105,8 @@ static void __save_processor_state(struct saved_context *ctxt) | |||
105 | ctxt->cr4 = read_cr4(); | 105 | ctxt->cr4 = read_cr4(); |
106 | ctxt->cr8 = read_cr8(); | 106 | ctxt->cr8 = read_cr8(); |
107 | #endif | 107 | #endif |
108 | ctxt->misc_enable_saved = !rdmsrl_safe(MSR_IA32_MISC_ENABLE, | ||
109 | &ctxt->misc_enable); | ||
108 | } | 110 | } |
109 | 111 | ||
110 | /* Needed by apm.c */ | 112 | /* Needed by apm.c */ |
@@ -152,6 +154,8 @@ static void fix_processor_context(void) | |||
152 | */ | 154 | */ |
153 | static void __restore_processor_state(struct saved_context *ctxt) | 155 | static void __restore_processor_state(struct saved_context *ctxt) |
154 | { | 156 | { |
157 | if (ctxt->misc_enable_saved) | ||
158 | wrmsrl(MSR_IA32_MISC_ENABLE, ctxt->misc_enable); | ||
155 | /* | 159 | /* |
156 | * control registers | 160 | * control registers |
157 | */ | 161 | */ |