diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-10-23 16:37:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-23 16:37:24 -0400 |
commit | 0de80bcc2baed116a569c38cbc38c5dcb945d14d (patch) | |
tree | 5eef7beda7307be2e8949f1bf0e7f84799d8ae31 /arch/x86/kernel/asm-offsets_64.c | |
parent | ef685298b4b3dead1efa1d47cd27ced0f2673254 (diff) |
x86: Save registers in saved_context during suspend and hibernation
During hibernation and suspend on x86_64 save CPU registers in the saved_context
structure rather than in a handful of separate variables.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/asm-offsets_64.c')
-rw-r--r-- | arch/x86/kernel/asm-offsets_64.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index 778953bc636c..7e50bda565b4 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c | |||
@@ -76,6 +76,34 @@ int main(void) | |||
76 | DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); | 76 | DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); |
77 | DEFINE(pbe_next, offsetof(struct pbe, next)); | 77 | DEFINE(pbe_next, offsetof(struct pbe, next)); |
78 | BLANK(); | 78 | BLANK(); |
79 | #define ENTRY(entry) DEFINE(pt_regs_ ## entry, offsetof(struct pt_regs, entry)) | ||
80 | ENTRY(rbx); | ||
81 | ENTRY(rbx); | ||
82 | ENTRY(rcx); | ||
83 | ENTRY(rdx); | ||
84 | ENTRY(rsp); | ||
85 | ENTRY(rbp); | ||
86 | ENTRY(rsi); | ||
87 | ENTRY(rdi); | ||
88 | ENTRY(r8); | ||
89 | ENTRY(r9); | ||
90 | ENTRY(r10); | ||
91 | ENTRY(r11); | ||
92 | ENTRY(r12); | ||
93 | ENTRY(r13); | ||
94 | ENTRY(r14); | ||
95 | ENTRY(r15); | ||
96 | ENTRY(eflags); | ||
97 | BLANK(); | ||
98 | #undef ENTRY | ||
99 | #define ENTRY(entry) DEFINE(saved_context_ ## entry, offsetof(struct saved_context, entry)) | ||
100 | ENTRY(cr0); | ||
101 | ENTRY(cr2); | ||
102 | ENTRY(cr3); | ||
103 | ENTRY(cr4); | ||
104 | ENTRY(cr8); | ||
105 | BLANK(); | ||
106 | #undef ENTRY | ||
79 | DEFINE(TSS_ist, offsetof(struct tss_struct, ist)); | 107 | DEFINE(TSS_ist, offsetof(struct tss_struct, ist)); |
80 | BLANK(); | 108 | BLANK(); |
81 | DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); | 109 | DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); |