aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/suspend_64.c8
-rw-r--r--arch/x86/power/cpu.c4
-rw-r--r--include/asm-x86/suspend_64.h2
-rw-r--r--include/linux/suspend.h3
4 files changed, 7 insertions, 10 deletions
diff --git a/arch/x86/kernel/suspend_64.c b/arch/x86/kernel/suspend_64.c
index 279c25775d19..09199511c256 100644
--- a/arch/x86/kernel/suspend_64.c
+++ b/arch/x86/kernel/suspend_64.c
@@ -17,6 +17,8 @@
17/* References to section boundaries */ 17/* References to section boundaries */
18extern const void __nosave_begin, __nosave_end; 18extern const void __nosave_begin, __nosave_end;
19 19
20static void fix_processor_context(void);
21
20struct saved_context saved_context; 22struct saved_context saved_context;
21 23
22/** 24/**
@@ -34,7 +36,7 @@ struct saved_context saved_context;
34 * needed by kernel A, so that it can operate correctly after the resume 36 * needed by kernel A, so that it can operate correctly after the resume
35 * regardless of what kernel B does in the meantime. 37 * regardless of what kernel B does in the meantime.
36 */ 38 */
37void __save_processor_state(struct saved_context *ctxt) 39static void __save_processor_state(struct saved_context *ctxt)
38{ 40{
39 kernel_fpu_begin(); 41 kernel_fpu_begin();
40 42
@@ -89,7 +91,7 @@ static void do_fpu_end(void)
89 * by __save_processor_state() 91 * by __save_processor_state()
90 * @ctxt - structure to load the registers contents from 92 * @ctxt - structure to load the registers contents from
91 */ 93 */
92void __restore_processor_state(struct saved_context *ctxt) 94static void __restore_processor_state(struct saved_context *ctxt)
93{ 95{
94 /* 96 /*
95 * control registers 97 * control registers
@@ -133,7 +135,7 @@ void restore_processor_state(void)
133 __restore_processor_state(&saved_context); 135 __restore_processor_state(&saved_context);
134} 136}
135 137
136void fix_processor_context(void) 138static void fix_processor_context(void)
137{ 139{
138 int cpu = smp_processor_id(); 140 int cpu = smp_processor_id();
139 struct tss_struct *t = &per_cpu(init_tss, cpu); 141 struct tss_struct *t = &per_cpu(init_tss, cpu);
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 5a98dc35addf..efcf620d1439 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -19,7 +19,7 @@ unsigned long saved_context_esp, saved_context_ebp;
19unsigned long saved_context_esi, saved_context_edi; 19unsigned long saved_context_esi, saved_context_edi;
20unsigned long saved_context_eflags; 20unsigned long saved_context_eflags;
21 21
22void __save_processor_state(struct saved_context *ctxt) 22static void __save_processor_state(struct saved_context *ctxt)
23{ 23{
24 mtrr_save_fixed_ranges(NULL); 24 mtrr_save_fixed_ranges(NULL);
25 kernel_fpu_begin(); 25 kernel_fpu_begin();
@@ -86,7 +86,7 @@ static void fix_processor_context(void)
86 86
87} 87}
88 88
89void __restore_processor_state(struct saved_context *ctxt) 89static void __restore_processor_state(struct saved_context *ctxt)
90{ 90{
91 /* 91 /*
92 * control registers 92 * control registers
diff --git a/include/asm-x86/suspend_64.h b/include/asm-x86/suspend_64.h
index 4404668f9aa4..2eb92cb81a0d 100644
--- a/include/asm-x86/suspend_64.h
+++ b/include/asm-x86/suspend_64.h
@@ -45,8 +45,6 @@ struct saved_context {
45#define loaddebug(thread,register) \ 45#define loaddebug(thread,register) \
46 set_debugreg((thread)->debugreg##register, register) 46 set_debugreg((thread)->debugreg##register, register)
47 47
48extern void fix_processor_context(void);
49
50/* routines for saving/restoring kernel state */ 48/* routines for saving/restoring kernel state */
51extern int acpi_save_state_mem(void); 49extern int acpi_save_state_mem(void);
52extern char core_restore_code; 50extern char core_restore_code;
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 4360e0816956..40280df2a3db 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -211,9 +211,6 @@ static inline int hibernate(void) { return -ENOSYS; }
211#ifdef CONFIG_PM_SLEEP 211#ifdef CONFIG_PM_SLEEP
212void save_processor_state(void); 212void save_processor_state(void);
213void restore_processor_state(void); 213void restore_processor_state(void);
214struct saved_context;
215void __save_processor_state(struct saved_context *ctxt);
216void __restore_processor_state(struct saved_context *ctxt);
217 214
218/* kernel/power/main.c */ 215/* kernel/power/main.c */
219extern struct blocking_notifier_head pm_chain_head; 216extern struct blocking_notifier_head pm_chain_head;