Split SOFTWARE_SUSPEND and ACPI_SLEEP
Subsystems (3)
Hi!
Splits two config options to avoid user confusion. Patrick already has better version of that patch in his tree, and probably wants to avoid applying this.
Pavel
arch/i386/kernel/Makefile +2 -1
@@ -24,7 +24,8 @@ obj-$(CONFIG_X86_MPPARSE) += mpparse.o obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o obj-$(CONFIG_X86_IO_APIC) += io_apic.o -obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o suspend_asm.o +obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o +obj-$(CONFIG_PM) += suspend_asm.o obj-$(CONFIG_X86_NUMAQ) += numaq.o obj-$(CONFIG_X86_SUMMIT) += summit.o obj-$(CONFIG_EDD) += edd.o
arch/i386/kernel/suspend_asm.S +2 -1
@@ -32,6 +32,7 @@ saved_context_eflags: .long 0 +#ifdef CONFIG_SOFTWARE_SUSPEND .text ENTRY(do_magic)
@@ -117,4 +118,4 @@ loop2: .quad 0 .previous - +#endif
drivers/acpi/Kconfig +2 -2
@@ -58,8 +58,8 @@ default y config ACPI_SLEEP - bool "Sleep States" - depends on X86 && ACPI && !ACPI_HT_ONLY && SOFTWARE_SUSPEND + bool "Sleep States (EXPERIMENTAL)" + depends on X86 && ACPI && !ACPI_HT_ONLY && EXPERIMENTAL ---help--- This option adds support for ACPI suspend states.
include/linux/suspend.h +8 -7
@@ -55,10 +55,6 @@extern int register_suspend_notifier (struct notifier_block *);extern int unregister_suspend_notifier (struct notifier_block *); -extern void refrigerator (unsigned long ); - -extern int freeze_processes (void ); -extern void thaw_processes (void ); extern unsigned int nr_copy_pages __nosavedata; extern suspend_pagedir_t *pagedir_nosave __nosavedata;
@@ -76,15 +72,20 @@extern void do_suspend_lowlevel_s4bios (int resume);#else -static inline void software_suspend (void ) -{ -} +static inline void software_suspend (void ) { }#define software_resume () do { } while(0)#define register_suspend_notifier (a) do { } while(0)#define unregister_suspend_notifier (a) do { } while(0) +#endif + +#ifdef CONFIG_PM +extern void refrigerator (unsigned long ); +extern int freeze_processes (void ); +extern void thaw_processes (void ); +#else #define refrigerator (a) do { BUG(); } while(0)#define freeze_processes () do { panic("You need CONFIG_SOFTWARE_SUSPEND to do sleeps."); } while(0)#define thaw_processes () do { } while(0)#endif #endif /* _LINUX_SWSUSP_H */
kernel/suspend.c +2 -0
@@ -65,6 +65,7 @@#include <asm/pgtable.h> #include <asm/io.h> +#ifdef CONFIG_SOFTWARE_SUSPEND extern long sys_sync (void );unsigned char software_suspend_enabled =0 ;
@@ -139,3 +139,4 @@static const char name_suspend[] ="Suspend Machine: " ;static const char name_resume[] ="Resume Machine: " ; +#endif
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Quoted 4 lines
Splits two config options to avoid user confusion. Patrick already has better version of that patch in his tree, and probably wants to avoid applying this.
Correct, I opted for my version, which moves kernel/suspend.c to kernel/power/swsusp.c, and moves the refrigerator code to process.c in that directory.
I have patches available, and will be posting them shortly.
-pat
Hi!
Quoted 7 lines
Quoted 3 lines
Splits two config options to avoid user confusion. Patrick already has better version of that patch in his tree, and probably wants to avoid applying this.
Correct, I opted for my version, which moves
kernel/suspend.ctokernel/power/swsusp.c, and moves the refrigerator code toprocess.cin that directory.
I actually like your version more. Good.
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]