summaryrefslogtreecommitdiffstats
path: root/arch/x86/power/cpu_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-05 09:18:39 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-05 09:18:39 +0200
commitaccf0fa697eeb5ff4c2360edc4da5b10abac0b7b (patch)
treea57dc9aa4a6b83be8ac8b4528cf06db5621e62aa /arch/x86/power/cpu_64.c
parentebd60cd64f8ab1170102c3ab072eb73042b7a33d (diff)
parentfe47784ba5cbb6b713c013e046859946789b45e4 (diff)
downloadblackbird-op-linux-accf0fa697eeb5ff4c2360edc4da5b10abac0b7b.tar.gz
blackbird-op-linux-accf0fa697eeb5ff4c2360edc4da5b10abac0b7b.zip
Merge branch 'x86/xsave' into x86/core
Diffstat (limited to 'arch/x86/power/cpu_64.c')
-rw-r--r--arch/x86/power/cpu_64.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/power/cpu_64.c b/arch/x86/power/cpu_64.c
index 66bdfb591fd8..e3b6cf70d62c 100644
--- a/arch/x86/power/cpu_64.c
+++ b/arch/x86/power/cpu_64.c
@@ -14,6 +14,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mtrr.h>
+#include <asm/xcr.h>
static void fix_processor_context(void);
@@ -122,6 +123,12 @@ static void __restore_processor_state(struct saved_context *ctxt)
wrmsrl(MSR_GS_BASE, ctxt->gs_base);
wrmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base);
+ /*
+ * restore XCR0 for xsave capable cpu's.
+ */
+ if (cpu_has_xsave)
+ xsetbv(XCR_XFEATURE_ENABLED_MASK, pcntxt_mask);
+
fix_processor_context();
do_fpu_end();
OpenPOWER on IntegriCloud