summaryrefslogtreecommitdiffstats
path: root/arch/x86/power/cpu.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-06-11 14:19:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-06-11 14:19:45 -0700
commit7ae1277a5202109a31d8f81ac99d4a53278dab84 (patch)
treeb32748f82150e4a37b2416ffc2d844cc7d9e7ee5 /arch/x86/power/cpu.c
parentb25b550bb153626df6a48eb8583e923e3dfcf64a (diff)
parent85a0e7539781dad4bfcffd98e72fa9f130f4e40d (diff)
downloadop-kernel-dev-7ae1277a5202109a31d8f81ac99d4a53278dab84.zip
op-kernel-dev-7ae1277a5202109a31d8f81ac99d4a53278dab84.tar.gz
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/x86/power/cpu.c')
-rw-r--r--arch/x86/power/cpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 0a979f3..1290ba5 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)
ctxt->cr4 = read_cr4();
ctxt->cr8 = read_cr8();
#endif
+ ctxt->misc_enable_saved = !rdmsrl_safe(MSR_IA32_MISC_ENABLE,
+ &ctxt->misc_enable);
}
/* Needed by apm.c */
@@ -152,6 +154,8 @@ static void fix_processor_context(void)
*/
static void __restore_processor_state(struct saved_context *ctxt)
{
+ if (ctxt->misc_enable_saved)
+ wrmsrl(MSR_IA32_MISC_ENABLE, ctxt->misc_enable);
/*
* control registers
*/
OpenPOWER on IntegriCloud