Re: [PATCH] x86: make __{save,restore}_processor_state static
* Jan Beulich <[EMAIL PROTECTED]> wrote: > .. 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. thanks, applied your patch to x86.git, for v2.6.25. Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] x86: make __{save,restore}_processor_state static
* Jan Beulich [EMAIL PROTECTED] wrote: .. 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. thanks, applied your patch to x86.git, for v2.6.25. Ingo -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] 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: Jan Beulich <[EMAIL PROTECTED]> arch/x86/kernel/suspend_64.c |8 +--- arch/x86/power/cpu.c |4 ++-- include/asm-x86/suspend_64.h |2 -- include/linux/suspend.h |3 --- 4 files changed, 7 insertions(+), 10 deletions(-) --- linux-2.6.24-rc5/arch/x86/kernel/suspend_64.c 2007-12-12 11:28:18.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/arch/x86/kernel/suspend_64.c 2007-12-05 15:57:55.0 +0100 @@ -17,9 +17,11 @@ /* References to section boundaries */ extern const void __nosave_begin, __nosave_end; +static void fix_processor_context(void); + struct saved_context saved_context; -void __save_processor_state(struct saved_context *ctxt) +static void __save_processor_state(struct saved_context *ctxt) { kernel_fpu_begin(); @@ -69,7 +71,7 @@ static void do_fpu_end(void) kernel_fpu_end(); } -void __restore_processor_state(struct saved_context *ctxt) +static void __restore_processor_state(struct saved_context *ctxt) { /* * control registers @@ -113,7 +115,7 @@ void restore_processor_state(void) __restore_processor_state(_context); } -void fix_processor_context(void) +static void fix_processor_context(void) { int cpu = smp_processor_id(); struct tss_struct *t = _cpu(init_tss, cpu); --- linux-2.6.24-rc5/arch/x86/power/cpu.c 2007-12-12 11:28:18.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/arch/x86/power/cpu.c 2007-12-05 15:54:57.0 +0100 @@ -19,7 +19,7 @@ unsigned long saved_context_esp, saved_c unsigned long saved_context_esi, saved_context_edi; 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); kernel_fpu_begin(); @@ -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 --- linux-2.6.24-rc5/include/asm-x86/suspend_64.h 2007-12-12 11:29:31.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/include/asm-x86/suspend_64.h 2007-12-05 15:49:36.0 +0100 @@ -38,8 +38,6 @@ struct saved_context { #define loaddebug(thread,register) \ set_debugreg((thread)->debugreg##register, register) -extern void fix_processor_context(void); - /* routines for saving/restoring kernel state */ extern int acpi_save_state_mem(void); extern char core_restore_code; --- linux-2.6.24-rc5/include/linux/suspend.h2007-12-12 11:29:38.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/include/linux/suspend.h 2007-12-05 15:54:33.0 +0100 @@ -211,9 +211,6 @@ static inline int hibernate(void) { retu #ifdef CONFIG_PM_SLEEP void save_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 */ extern struct blocking_notifier_head pm_chain_head; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] 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: Jan Beulich [EMAIL PROTECTED] arch/x86/kernel/suspend_64.c |8 +--- arch/x86/power/cpu.c |4 ++-- include/asm-x86/suspend_64.h |2 -- include/linux/suspend.h |3 --- 4 files changed, 7 insertions(+), 10 deletions(-) --- linux-2.6.24-rc5/arch/x86/kernel/suspend_64.c 2007-12-12 11:28:18.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/arch/x86/kernel/suspend_64.c 2007-12-05 15:57:55.0 +0100 @@ -17,9 +17,11 @@ /* References to section boundaries */ extern const void __nosave_begin, __nosave_end; +static void fix_processor_context(void); + struct saved_context saved_context; -void __save_processor_state(struct saved_context *ctxt) +static void __save_processor_state(struct saved_context *ctxt) { kernel_fpu_begin(); @@ -69,7 +71,7 @@ static void do_fpu_end(void) kernel_fpu_end(); } -void __restore_processor_state(struct saved_context *ctxt) +static void __restore_processor_state(struct saved_context *ctxt) { /* * control registers @@ -113,7 +115,7 @@ void restore_processor_state(void) __restore_processor_state(saved_context); } -void fix_processor_context(void) +static void fix_processor_context(void) { int cpu = smp_processor_id(); struct tss_struct *t = per_cpu(init_tss, cpu); --- linux-2.6.24-rc5/arch/x86/power/cpu.c 2007-12-12 11:28:18.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/arch/x86/power/cpu.c 2007-12-05 15:54:57.0 +0100 @@ -19,7 +19,7 @@ unsigned long saved_context_esp, saved_c unsigned long saved_context_esi, saved_context_edi; 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); kernel_fpu_begin(); @@ -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 --- linux-2.6.24-rc5/include/asm-x86/suspend_64.h 2007-12-12 11:29:31.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/include/asm-x86/suspend_64.h 2007-12-05 15:49:36.0 +0100 @@ -38,8 +38,6 @@ struct saved_context { #define loaddebug(thread,register) \ set_debugreg((thread)-debugreg##register, register) -extern void fix_processor_context(void); - /* routines for saving/restoring kernel state */ extern int acpi_save_state_mem(void); extern char core_restore_code; --- linux-2.6.24-rc5/include/linux/suspend.h2007-12-12 11:29:38.0 +0100 +++ 2.6.24-rc5-x86-suspend-static/include/linux/suspend.h 2007-12-05 15:54:33.0 +0100 @@ -211,9 +211,6 @@ static inline int hibernate(void) { retu #ifdef CONFIG_PM_SLEEP void save_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 */ extern struct blocking_notifier_head pm_chain_head; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/