aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/power/cpu_32.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2008-08-27 14:57:36 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-27 15:23:23 -0700
commit83b8e28b14d63db928cb39e5c5ed2a548246bd71 (patch)
tree27abd5df0e150e411265ac5a2c834279813eb8dc /arch/x86/power/cpu_32.c
parentf65bc214e042916135256620f900e9599d65e0cb (diff)
x86: xsave: restore xcr0 during resume
Add the missing XCR0(XFEATURE_ENABLED_MASK) restore during resume. Reported-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/power/cpu_32.c')
-rw-r--r--arch/x86/power/cpu_32.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c
index 7dc5d5cf50a..02f36f53558 100644
--- a/arch/x86/power/cpu_32.c
+++ b/arch/x86/power/cpu_32.c
@@ -11,6 +11,7 @@
#include <linux/suspend.h>
#include <asm/mtrr.h>
#include <asm/mce.h>
+#include <asm/xcr.h>
static struct saved_context saved_context;
@@ -124,6 +125,12 @@ static void __restore_processor_state(struct saved_context *ctxt)
if (boot_cpu_has(X86_FEATURE_SEP))
enable_sep_cpu();
+ /*
+ * restore XCR0 for xsave capable cpu's.
+ */
+ if (cpu_has_xsave)
+ xsetbv(XCR_XFEATURE_ENABLED_MASK, pcntxt_mask);
+
fix_processor_context();
do_fpu_end();
mtrr_ap_init();