Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112788
b: refs/heads/master
c: 83b8e28
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and H. Peter Anvin committed Aug 27, 2008
1 parent 58b3400 commit 290de1f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f65bc214e042916135256620f900e9599d65e0cb
refs/heads/master: 83b8e28b14d63db928cb39e5c5ed2a548246bd71
7 changes: 7 additions & 0 deletions trunk/arch/x86/power/cpu_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/x86/power/cpu_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 290de1f

Please sign in to comment.