Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53764
b: refs/heads/master
c: 3c321bc
h: refs/heads/master
v: v3
  • Loading branch information
Vivek Goyal authored and Andi Kleen committed May 2, 2007
1 parent 4ec210f commit 5dcb9ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30f472895401fbe8e64f861a2569bc9acb098741
refs/heads/master: 3c321bceb4a626639ab43a5a24d884930e511826
3 changes: 2 additions & 1 deletion trunk/arch/x86_64/kernel/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ void __save_processor_state(struct saved_context *ctxt)
asm volatile ("str %0" : "=m" (ctxt->tr));

/* XMM0..XMM15 should be handled by kernel_fpu_begin(). */
/* EFER should be constant for kernel version, no need to handle it. */
/*
* segment registers
*/
Expand All @@ -50,6 +49,7 @@ void __save_processor_state(struct saved_context *ctxt)
/*
* control registers
*/
rdmsrl(MSR_EFER, ctxt->efer);
asm volatile ("movq %%cr0, %0" : "=r" (ctxt->cr0));
asm volatile ("movq %%cr2, %0" : "=r" (ctxt->cr2));
asm volatile ("movq %%cr3, %0" : "=r" (ctxt->cr3));
Expand All @@ -75,6 +75,7 @@ void __restore_processor_state(struct saved_context *ctxt)
/*
* control registers
*/
wrmsrl(MSR_EFER, ctxt->efer);
asm volatile ("movq %0, %%cr8" :: "r" (ctxt->cr8));
asm volatile ("movq %0, %%cr4" :: "r" (ctxt->cr4));
asm volatile ("movq %0, %%cr3" :: "r" (ctxt->cr3));
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-x86_64/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct saved_context {
u16 ds, es, fs, gs, ss;
unsigned long gs_base, gs_kernel_base, fs_base;
unsigned long cr0, cr2, cr3, cr4, cr8;
unsigned long efer;
u16 gdt_pad;
u16 gdt_limit;
unsigned long gdt_base;
Expand Down

0 comments on commit 5dcb9ad

Please sign in to comment.