Commit cae45957 authored by Jan Beulich's avatar Jan Beulich Committed by Ingo Molnar

x86: make __{save,restore}_processor_state static

.. allowing to remove their declarations from a global include file
(the symbols don't exist for anything but x86).

Likewise for 64-bits' fix_processor_context(), just that that one was
properly declared in an arch-specific header.
Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 3e7622f9
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
/* References to section boundaries */ /* References to section boundaries */
extern const void __nosave_begin, __nosave_end; extern const void __nosave_begin, __nosave_end;
static void fix_processor_context(void);
struct saved_context saved_context; struct saved_context saved_context;
/** /**
...@@ -34,7 +36,7 @@ struct saved_context saved_context; ...@@ -34,7 +36,7 @@ struct saved_context saved_context;
* needed by kernel A, so that it can operate correctly after the resume * needed by kernel A, so that it can operate correctly after the resume
* regardless of what kernel B does in the meantime. * regardless of what kernel B does in the meantime.
*/ */
void __save_processor_state(struct saved_context *ctxt) static void __save_processor_state(struct saved_context *ctxt)
{ {
kernel_fpu_begin(); kernel_fpu_begin();
...@@ -89,7 +91,7 @@ static void do_fpu_end(void) ...@@ -89,7 +91,7 @@ static void do_fpu_end(void)
* by __save_processor_state() * by __save_processor_state()
* @ctxt - structure to load the registers contents from * @ctxt - structure to load the registers contents from
*/ */
void __restore_processor_state(struct saved_context *ctxt) static void __restore_processor_state(struct saved_context *ctxt)
{ {
/* /*
* control registers * control registers
...@@ -133,7 +135,7 @@ void restore_processor_state(void) ...@@ -133,7 +135,7 @@ void restore_processor_state(void)
__restore_processor_state(&saved_context); __restore_processor_state(&saved_context);
} }
void fix_processor_context(void) static void fix_processor_context(void)
{ {
int cpu = smp_processor_id(); int cpu = smp_processor_id();
struct tss_struct *t = &per_cpu(init_tss, cpu); struct tss_struct *t = &per_cpu(init_tss, cpu);
......
...@@ -19,7 +19,7 @@ unsigned long saved_context_esp, saved_context_ebp; ...@@ -19,7 +19,7 @@ unsigned long saved_context_esp, saved_context_ebp;
unsigned long saved_context_esi, saved_context_edi; unsigned long saved_context_esi, saved_context_edi;
unsigned long saved_context_eflags; unsigned long saved_context_eflags;
void __save_processor_state(struct saved_context *ctxt) static void __save_processor_state(struct saved_context *ctxt)
{ {
mtrr_save_fixed_ranges(NULL); mtrr_save_fixed_ranges(NULL);
kernel_fpu_begin(); kernel_fpu_begin();
...@@ -86,7 +86,7 @@ static void fix_processor_context(void) ...@@ -86,7 +86,7 @@ static void fix_processor_context(void)
} }
void __restore_processor_state(struct saved_context *ctxt) static void __restore_processor_state(struct saved_context *ctxt)
{ {
/* /*
* control registers * control registers
......
...@@ -45,8 +45,6 @@ struct saved_context { ...@@ -45,8 +45,6 @@ struct saved_context {
#define loaddebug(thread,register) \ #define loaddebug(thread,register) \
set_debugreg((thread)->debugreg##register, register) set_debugreg((thread)->debugreg##register, register)
extern void fix_processor_context(void);
/* routines for saving/restoring kernel state */ /* routines for saving/restoring kernel state */
extern int acpi_save_state_mem(void); extern int acpi_save_state_mem(void);
extern char core_restore_code; extern char core_restore_code;
......
...@@ -211,9 +211,6 @@ static inline int hibernate(void) { return -ENOSYS; } ...@@ -211,9 +211,6 @@ static inline int hibernate(void) { return -ENOSYS; }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
void save_processor_state(void); void save_processor_state(void);
void restore_processor_state(void); void restore_processor_state(void);
struct saved_context;
void __save_processor_state(struct saved_context *ctxt);
void __restore_processor_state(struct saved_context *ctxt);
/* kernel/power/main.c */ /* kernel/power/main.c */
extern struct blocking_notifier_head pm_chain_head; extern struct blocking_notifier_head pm_chain_head;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment