diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-08-27 17:57:36 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-27 18:23:23 -0400 |
commit | 83b8e28b14d63db928cb39e5c5ed2a548246bd71 (patch) | |
tree | 27abd5df0e150e411265ac5a2c834279813eb8dc /arch/x86/power/cpu_32.c | |
parent | f65bc214e042916135256620f900e9599d65e0cb (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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c index 7dc5d5cf50a2..02f36f53558c 100644 --- a/arch/x86/power/cpu_32.c +++ b/arch/x86/power/cpu_32.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/suspend.h> | 11 | #include <linux/suspend.h> |
12 | #include <asm/mtrr.h> | 12 | #include <asm/mtrr.h> |
13 | #include <asm/mce.h> | 13 | #include <asm/mce.h> |
14 | #include <asm/xcr.h> | ||
14 | 15 | ||
15 | static struct saved_context saved_context; | 16 | static struct saved_context saved_context; |
16 | 17 | ||
@@ -124,6 +125,12 @@ static void __restore_processor_state(struct saved_context *ctxt) | |||
124 | if (boot_cpu_has(X86_FEATURE_SEP)) | 125 | if (boot_cpu_has(X86_FEATURE_SEP)) |
125 | enable_sep_cpu(); | 126 | enable_sep_cpu(); |
126 | 127 | ||
128 | /* | ||
129 | * restore XCR0 for xsave capable cpu's. | ||
130 | */ | ||
131 | if (cpu_has_xsave) | ||
132 | xsetbv(XCR_XFEATURE_ENABLED_MASK, pcntxt_mask); | ||
133 | |||
127 | fix_processor_context(); | 134 | fix_processor_context(); |
128 | do_fpu_end(); | 135 | do_fpu_end(); |
129 | mtrr_ap_init(); | 136 | mtrr_ap_init(); |