SOURCES (LINUX_2_6): linux-2.6-suspend2.patch - http://www.suspend...

mguevara mguevara at pld-linux.org
Mon Apr 30 13:31:27 CEST 2007


Author: mguevara                     Date: Mon Apr 30 11:31:27 2007 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- http://www.suspend2.net/downloads/all/suspend2-2.2.9.13-for-2.6.21-rc7.patch.bz2

---- Files affected:
SOURCES:
   linux-2.6-suspend2.patch (1.1.2.2 -> 1.1.2.2.2.1) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-suspend2.patch
diff -u SOURCES/linux-2.6-suspend2.patch:1.1.2.2 SOURCES/linux-2.6-suspend2.patch:1.1.2.2.2.1
--- SOURCES/linux-2.6-suspend2.patch:1.1.2.2	Mon Apr 16 14:57:21 2007
+++ SOURCES/linux-2.6-suspend2.patch	Mon Apr 30 13:31:22 2007
@@ -1,16 +1,16 @@
 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index 25d2985..588676f 100644
+index 12533a9..68e902e 100644
 --- a/Documentation/kernel-parameters.txt
 +++ b/Documentation/kernel-parameters.txt
-@@ -80,6 +80,7 @@ parameter is applicable:
- 	SERIAL	Serial support is enabled.
+@@ -82,6 +82,7 @@ parameter is applicable:
+ 	SH	SuperH architecture is enabled.
  	SMP	The kernel is an SMP kernel.
  	SPARC	Sparc architecture is enabled.
 +	SUSPEND2 Suspend2 is enabled.
  	SWSUSP	Software suspend is enabled.
  	TS	Appropriate touchscreen support is enabled.
  	USB	USB support is enabled.
-@@ -1099,6 +1100,8 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -1140,6 +1141,8 @@ and is between 256 and 4096 characters. It is defined in the file
  	noresume	[SWSUSP] Disables resume and restores original swap
  			space.
  
@@ -19,9 +19,9 @@
  	no-scroll	[VGA] Disables scrollback.
  			This is required for the Braillex ib80-piezo Braille
  			reader made by F.H. Papenmeier (Germany).
-@@ -1396,6 +1399,11 @@ and is between 256 and 4096 characters. It is defined in the file
- 			in <PAGE_SIZE> units (needed only for swap files).
- 			See  Documentation/power/swsusp-and-swap-files.txt
+@@ -1445,6 +1448,11 @@ and is between 256 and 4096 characters. It is defined in the file
+ 
+ 	retain_initrd	[RAM] Keep initrd memory after extraction
  
 + 	resume2=	[SUSPEND2] Specify the storage device for Suspend2.
 +			Format: <writer>:<writer-parameters>.
@@ -33,10 +33,10 @@
  
 diff --git a/Documentation/power/Suspend2-Changelog.txt b/Documentation/power/Suspend2-Changelog.txt
 new file mode 100644
-index 0000000..58f82be
+index 0000000..a9b672a
 --- /dev/null
 +++ b/Documentation/power/Suspend2-Changelog.txt
-@@ -0,0 +1,1046 @@
+@@ -0,0 +1,1093 @@
 +Suspend2 changelog.
 +
 +Still to do prior to 2.2.10...
@@ -45,6 +45,53 @@
 +- RAID support.
 +- Fix building core as a module for people who currently get a hang
 +  while doing the atomic restore.
++- Trying to reserve swap space before any allocated? (Kenneth's extent
++  state eof while preparing the image).
++- Look at testing lid state when wake from STR and powering off immediately.
++- Fix checksumming.
++
++2.2.9.13 - 24 April 2007
++
++- RAID BUG() addressed.
++- Fixed exports for new userui module (compilation issue).
++- Fixed missed sysfs macro changes in checksum module.
++- Fix missed suspend_extent_state_eof() modification.
++- Modify 'initrd lacks echo' message to be more specific.
++- Give more details status to help with diagnosing atomic copy hangs.
++- In suspend_start_anything, if rechecking which allocator to use,
++  be quiet only if we're not starting a cycle.
++- Supress (renamed) 'lacks an echo' whenever the echo is done, not just
++  if we succeed in initialising modules.
++- Fix infinite loop in shrink_one_zone.
++- Fix oops if highmem support enabled but no highmem pages are in pageset 1.
++- Fix failure to add flag enabling storage manager usage.
++- Fix missing cpus allowed reseting on finish_anything.
++
++2.2.9.12 - 18 April 2007
++- Fix compressor initialisation failures when active allocator isn't yet set
++  (dmsetup, eg).
++- Early cpu hotplugging support, enabled the default while late hotplugging
++  is being worked on upstream. This means that, by default, you won't get
++  multithreaded I/O. /sys/power/suspend2/late_cpu_hotplug enables the
++  late cpu hotplugging that was the default between 2.2.9.4 and .11.
++- Separated userui support into its own module (CONFIG_SUSPEND2_USERUI).
++- Correction to code iterating through block chains (test for ==, not >).
++- Support for modules sharing a directory. Used in userui separation so
++  that the location of userui entries didn't change.
++- Yield instead of scheduling in netlink code. This results in actually
++  seeing progress_granularity steps in the userui display on my computer;
++  previously the netlink messages were being bunched up.
++- Further improvements to memory freeing code, seeking to make it more
++  reliable.
++- Make sysfs entry flags more generic and use to indicate separately whether
++  suspending or resuming.
++- Dump block chains if we discover we're going to overwrite the start of
++  pageset2 with the header.
++- Don't do anything in compression initialisation routine if we're not
++  starting a cycle.
++- Correct bug that stopped us releasing fileallocator storage when a first
++  cycle was aborted.
++- Filewriter shouldn't complain if no target has been set when we're resuming.
 +
 +2.2.9.11 - 14 April 2007
 +- Remove RH copyrights - no Suspend2 work done in Redhat time to date.
@@ -2282,10 +2329,10 @@
 +   most of us (Nigel included!) would consider testing. His efforts have
 +   contributed as much to Suspend2 as any of the names above.
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 0ad8803..8a54929 100644
+index ef84419..2ec9eaa 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -3141,6 +3141,13 @@ M:	sammy at sammy.net
+@@ -3227,6 +3227,13 @@ M:	sammy at sammy.net
  W:	http://sammy.net/sun3/
  S:	Maintained
  
@@ -2300,7 +2347,7 @@
  P:	Martin Mares
  M:	mj at ucw.cz
 diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
-index aaaa4d2..b9b1509 100644
+index b8c4e25..21982d9 100644
 --- a/arch/i386/mm/fault.c
 +++ b/arch/i386/mm/fault.c
 @@ -23,6 +23,7 @@
@@ -2321,7 +2368,7 @@
  int register_page_fault_notifier(struct notifier_block *nb)
  {
  	vmalloc_sync_all();
-@@ -337,6 +341,20 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
+@@ -311,6 +315,20 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
  
  	si_code = SEGV_MAPERR;
  
@@ -2343,10 +2390,10 @@
  	 * We fault-in kernel-space virtual memory on-demand. The
  	 * 'reference' page table is init_mm.pgd.
 diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
-index c5c5ea7..22bf577 100644
+index ae43688..a180d21 100644
 --- a/arch/i386/mm/init.c
 +++ b/arch/i386/mm/init.c
-@@ -383,7 +383,7 @@ static void __init pagetable_init (void)
+@@ -387,7 +387,7 @@ static void __init pagetable_init (void)
  #endif
  }
  
@@ -2355,7 +2402,7 @@
  /*
   * Swap suspend & friends need this for resume because things like the intel-agp
   * driver might have split up a kernel 4MB mapping.
-@@ -770,13 +770,13 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
+@@ -774,13 +774,13 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
  	unsigned long addr;
  
  	for (addr = begin; addr < end; addr += PAGE_SIZE) {
@@ -2375,10 +2422,10 @@
  
  void free_initmem(void)
 diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
-index ad91528..2e0f0f8 100644
+index 412ebbd..dded2e1 100644
 --- a/arch/i386/mm/pageattr.c
 +++ b/arch/i386/mm/pageattr.c
-@@ -250,7 +250,27 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
+@@ -252,7 +252,27 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
  	 */
  	__flush_tlb_all();
  }
@@ -2415,10 +2462,10 @@
 -obj-$(CONFIG_SOFTWARE_SUSPEND)	+= swsusp.o suspend.o
 +obj-$(CONFIG_SUSPEND_SHARED)	+= swsusp.o suspend.o
 diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
-index d2ded19..a5a5895 100644
+index 8120d42..5d57f0c 100644
 --- a/arch/powerpc/kernel/Makefile
 +++ b/arch/powerpc/kernel/Makefile
-@@ -35,7 +35,7 @@ obj-$(CONFIG_GENERIC_TBSYNC)	+= smp-tbsync.o
+@@ -36,7 +36,7 @@ obj-$(CONFIG_GENERIC_TBSYNC)	+= smp-tbsync.o
  obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
  obj-$(CONFIG_6xx)		+= idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
  obj-$(CONFIG_TAU)		+= tau_6xx.o
@@ -2428,7 +2475,7 @@
  
  ifeq ($(CONFIG_PPC_MERGE),y)
 diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
-index 3c7cbff..3cb3c7b 100644
+index bb47e86..9943190 100644
 --- a/arch/x86_64/kernel/Makefile
 +++ b/arch/x86_64/kernel/Makefile
 @@ -26,7 +26,7 @@ obj-y				+= io_apic.o mpparse.o \
@@ -2460,7 +2507,7 @@
 -#endif /* CONFIG_SOFTWARE_SUSPEND */
 +#endif /* CONFIG_SUSPEND_SHARED */
 diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
-index 38c293b..1f0d329 100644
+index 3de0695..3fb956d 100644
 --- a/block/ll_rw_blk.c
 +++ b/block/ll_rw_blk.c
 @@ -30,6 +30,8 @@
@@ -2472,22 +2519,20 @@
  
  /*
   * for max sense size
-@@ -3248,6 +3250,10 @@ void submit_bio(int rw, struct bio *bio)
+@@ -3247,7 +3249,7 @@ void submit_bio(int rw, struct bio *bio)
+ 			(unsigned long long)bio->bi_sector,
  			bdevname(bio->bi_bdev,b));
  	}
- 
-+	BUG_ON( test_suspend_state(SUSPEND_RUNNING) &&	/* Suspend2, that is */
-+		freezer_is_on() &&
-+		!(bio->bi_flags & (1 << BIO_SUSPEND_DATA)));
+-
 +	
  	generic_make_request(bio);
  }
  
 diff --git a/crypto/Kconfig b/crypto/Kconfig
-index 92ba249..e3fbcfe 100644
+index 086fcec..efde46c 100644
 --- a/crypto/Kconfig
 +++ b/crypto/Kconfig
-@@ -439,6 +439,14 @@ config CRYPTO_DEFLATE
+@@ -406,6 +406,14 @@ config CRYPTO_DEFLATE
  	  
  	  You will most probably want this if using IPSec.
  
@@ -2503,10 +2548,10 @@
  	tristate "Michael MIC keyed digest algorithm"
  	select CRYPTO_ALGAPI
 diff --git a/crypto/Makefile b/crypto/Makefile
-index 60e3d24..cd605ec 100644
+index 12f93f5..69a8af3 100644
 --- a/crypto/Makefile
 +++ b/crypto/Makefile
-@@ -43,5 +43,6 @@ obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
+@@ -46,5 +46,6 @@ obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
  obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
  obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
  obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
@@ -2855,7 +2900,7 @@
 +MODULE_DESCRIPTION("LZF Compression Algorithm");
 +MODULE_AUTHOR("Marc Alexander Lehmann & Nigel Cunningham");
 diff --git a/drivers/base/core.c b/drivers/base/core.c
-index 67b79a7..362757f 100644
+index d7fcf82..edbbf76 100644
 --- a/drivers/base/core.c
 +++ b/drivers/base/core.c
 @@ -27,6 +27,8 @@
@@ -2867,7 +2912,7 @@
  /*
   * sysfs bindings for devices.
   */
-@@ -552,6 +554,18 @@ int device_add(struct device *dev)
+@@ -638,6 +640,18 @@ int device_add(struct device *dev)
  				class_intf->add_dev(dev, class_intf);
  		up(&dev->class->sem);
  	}
@@ -2886,7 +2931,7 @@
   Done:
   	kfree(class_name);
  	put_device(dev);
-@@ -851,6 +865,7 @@ struct device *device_create(struct class *class, struct device *parent,
+@@ -975,6 +989,7 @@ struct device *device_create(struct class *class, struct device *parent,
  	dev->class = class;
  	dev->parent = parent;
  	dev->release = device_create_release;
@@ -2894,7 +2939,7 @@
  
  	va_start(args, fmt);
  	vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args);
-@@ -1048,3 +1063,11 @@ out:
+@@ -1183,3 +1198,11 @@ out:
  }
  
  EXPORT_SYMBOL_GPL(device_move);
@@ -2907,7 +2952,7 @@
 +
 +__setup("pm_debug_dump_stack", pm_debug_dump_stack);
 diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
-index 8ca75e5..9f56087 100644
+index b6073bd..32bd423 100644
 --- a/drivers/macintosh/via-pmu.c
 +++ b/drivers/macintosh/via-pmu.c
 @@ -42,7 +42,6 @@
@@ -2919,10 +2964,10 @@
  #include <linux/suspend.h>
  #include <linux/cpu.h>
 diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
-index 92d5e8d..f49da90 100644
+index a3c1755..171be82 100644
 --- a/drivers/pci/pci-driver.c
 +++ b/drivers/pci/pci-driver.c
-@@ -449,6 +449,10 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner)
+@@ -451,6 +451,10 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner,
  	if (error)
  		driver_unregister(&drv->driver);
  
@@ -2934,10 +2979,10 @@
  }
  
 diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
-index d6eb5ce..1edc9f5 100644
+index 9e3e943..d0ced9e 100644
 --- a/drivers/usb/core/driver.c
 +++ b/drivers/usb/core/driver.c
-@@ -709,6 +709,9 @@ int usb_register_device_driver(struct usb_device_driver *new_udriver,
+@@ -721,6 +721,9 @@ int usb_register_device_driver(struct usb_device_driver *new_udriver,
  		pr_info("%s: registered new device driver %s\n",
  			usbcore_name, new_udriver->name);
  		usbfs_update_special();
@@ -3024,12 +3069,12 @@
  
  /*
 diff --git a/include/linux/device.h b/include/linux/device.h
-index f44247f..bca61a0 100644
+index 5cf30e9..69122c1 100644
 --- a/include/linux/device.h
 +++ b/include/linux/device.h
-@@ -356,6 +356,7 @@ struct device {
- 	struct kobject kobj;
+@@ -402,6 +402,7 @@ struct device {
  	char	bus_id[BUS_ID_SIZE];	/* position on parent bus */
+ 	struct device_type	*type;
  	unsigned		is_registered:1;
 +	unsigned		pm_safe:1; /* No resume fn is ok? */
  	struct device_attribute uevent_attr;
@@ -3155,10 +3200,10 @@
  #endif
 +#endif
 diff --git a/include/linux/kernel.h b/include/linux/kernel.h
-index 63fb18d..161c54e 100644
+index 9ddf25c..c18ec95 100644
 --- a/include/linux/kernel.h
 +++ b/include/linux/kernel.h
-@@ -118,6 +118,8 @@ extern int vsprintf(char *buf, const char *, va_list)
+@@ -113,6 +113,8 @@ extern int vsprintf(char *buf, const char *, va_list)
  	__attribute__ ((format (printf, 2, 0)));
  extern int snprintf(char * buf, size_t size, const char * fmt, ...)
  	__attribute__ ((format (printf, 3, 4)));
@@ -3168,15 +3213,15 @@
  	__attribute__ ((format (printf, 3, 0)));
  extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
 diff --git a/include/linux/netlink.h b/include/linux/netlink.h
-index b3b9b60..dbf46f0 100644
+index 2a20f48..b4d9db1 100644
 --- a/include/linux/netlink.h
 +++ b/include/linux/netlink.h
-@@ -23,6 +23,8 @@
- #define NETLINK_GENERIC		16
+@@ -24,6 +24,8 @@
  /* leave room for NETLINK_DM (DM Events) */
  #define NETLINK_SCSITRANSPORT	18	/* SCSI Transports */
-+#define NETLINK_SUSPEND2_USERUI	19	/* For suspend2's userui */
-+#define NETLINK_SUSPEND2_USM	20	/* For suspend2's userspace storage manager */
+ #define NETLINK_ECRYPTFS	19
++#define NETLINK_SUSPEND2_USERUI	20	/* For suspend2's userui */
++#define NETLINK_SUSPEND2_USM	21	/* For suspend2's userspace storage manager */
  
  #define MAX_LINKS 32		
  
@@ -3279,10 +3324,10 @@
 +
  #endif /* _LINUX_SWSUSP_H */
 diff --git a/include/linux/swap.h b/include/linux/swap.h
-index 5423559..9d01fd5 100644
+index 0068688..ad3fead 100644
 --- a/include/linux/swap.h
 +++ b/include/linux/swap.h
-@@ -188,6 +188,7 @@ extern void swap_setup(void);
+@@ -190,6 +190,7 @@ extern void swap_setup(void);
  /* linux/mm/vmscan.c */
  extern unsigned long try_to_free_pages(struct zone **, gfp_t);
  extern unsigned long shrink_all_memory(unsigned long nr_pages);
@@ -3290,7 +3335,7 @@
  extern int vm_swappiness;
  extern int remove_mapping(struct address_space *mapping, struct page *page);
  extern long vm_total_pages;
-@@ -366,5 +367,10 @@ static inline swp_entry_t get_swap_page(void)
+@@ -368,5 +369,10 @@ static inline swp_entry_t get_swap_page(void)
  #define disable_swap_token() do { } while(0)
  
  #endif /* CONFIG_SWAP */
@@ -3363,7 +3408,7 @@
  		ROOT_DEV = Root_RAM0;
  
 diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
-index 2cfd7cb..06584f2 100644
+index 2cfd7cb..b32a3dc 100644
 --- a/init/do_mounts_initrd.c
 +++ b/init/do_mounts_initrd.c
 @@ -6,6 +6,7 @@
@@ -3374,7 +3419,7 @@
  #include <linux/freezer.h>
  
  #include "do_mounts.h"
-@@ -58,10 +59,17 @@ static void __init handle_initrd(void)
+@@ -58,10 +59,18 @@ static void __init handle_initrd(void)
  	current->flags |= PF_NOFREEZE;
  	pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
  	if (pid > 0) {
@@ -3386,7 +3431,8 @@
  	}
  
 +	if (test_suspend_state(SUSPEND_RESUME_NOT_DONE))
-+		printk(KERN_ERR "Suspend2: Initrd lacks echo > /sys/power/suspend2/do_resume.\n");
++		printk(KERN_ERR "Suspend2: No attempt was made to resume from "
++				"any image that might exist.\n");
 +	clear_suspend_state(SUSPEND_BOOT_TIME);
 +	current->flags &= ~PF_NOFREEZE;
 +
@@ -3394,10 +3440,10 @@
  	sys_fchdir(old_fd);
  	sys_mount("/", ".", NULL, MS_MOVE, NULL);
 diff --git a/init/main.c b/init/main.c
-index 8b4a7d7..d7ce79c 100644
+index a92989e..cd3f60f 100644
 --- a/init/main.c
 +++ b/init/main.c
-@@ -52,6 +52,7 @@
+@@ -54,6 +54,7 @@
  #include <linux/lockdep.h>
  #include <linux/pid_namespace.h>
  #include <linux/device.h>
@@ -3405,7 +3451,7 @@
  
  #include <asm/io.h>
  #include <asm/bugs.h>
-@@ -745,7 +746,9 @@ static int init(void * unused)
+@@ -804,7 +805,9 @@ static int __init init(void * unused)
  
  	/*
  	 * check if there is an early userspace init.  If yes, let it do all
@@ -3417,7 +3463,7 @@
  
  	if (!ramdisk_execute_command)
 diff --git a/kernel/kmod.c b/kernel/kmod.c
-index 3a7379a..cbea323 100644
+index 7962761..f0d6fc1 100644
 --- a/kernel/kmod.c
 +++ b/kernel/kmod.c
 @@ -34,6 +34,7 @@
@@ -3428,9 +3474,9 @@
  #include <asm/uaccess.h>
  
  extern int max_threads;
-@@ -283,6 +284,11 @@ int call_usermodehelper_keys(char *path, char **argv, char **envp,
- 	if (path[0] == '\0')
- 		return 0;
+@@ -338,6 +339,11 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp,
+ 	}
+ 	sub_info.stdin = f;
  
 +	if (freezer_is_on()) {
 +		printk(KERN_WARNING "Freezer is on. Refusing to start %s.\n", path);
@@ -3441,7 +3487,7 @@
  	wait_for_completion(&done);
  	return sub_info.retval;
 diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
-index ed29622..0a7f24f 100644
+index 51a4dd0..5d4b077 100644
 --- a/kernel/power/Kconfig
 +++ b/kernel/power/Kconfig
 @@ -48,6 +48,17 @@ config DISABLE_CONSOLE_SUSPEND
@@ -3462,10 +3508,10 @@
  config PM_TRACE
  	bool "Suspend/resume event tracing"
  	depends on PM && PM_DEBUG && X86_32 && EXPERIMENTAL
-@@ -131,3 +142,158 @@ config SUSPEND_SMP
- 	bool
- 	depends on HOTPLUG_CPU && X86 && PM
- 	default y
+@@ -162,3 +173,174 @@ config APM_EMULATION
+ 	  random kernel OOPSes or reboots that don't seem to be related to
+ 	  anything, try disabling/enabling this option (or disabling/enabling
+ 	  APM in your BIOS).
 +
 +menuconfig SUSPEND2_CORE
 +	tristate "Suspend2"
@@ -3518,6 +3564,16 @@
 +	comment "No compression support available without Cryptoapi support."
 +		depends on SUSPEND2_CORE && !CRYPTO
 +
++	config SUSPEND2_USERUI
++		tristate "Userspace User Interface support"
++		depends on SUSPEND2_CORE && NET
++		default y
++		---help---
++		  This option enabled support for a userspace based user interface
++		  to Suspend2, which allows you to have a nice display while suspending
++		  and resuming, and also enables features such as pressing escape to
++		  cancel a cycle or interactive debugging.
++
 +	config SUSPEND2_DEFAULT_RESUME2
 +		string "Default resume device name"
 +		depends on SUSPEND2_CORE
@@ -3591,6 +3647,11 @@
 +	depends on SUSPEND2_CORE || SOFTWARE_SUSPEND
 +	default y
 +
++config SUSPEND2_USERUI_EXPORTS
++	bool
++	depends on SUSPEND2_USERUI=m
++	default y
++
 +config SUSPEND2_SWAP_EXPORTS
 +	bool
 +	depends on SUSPEND2_SWAP=m
@@ -3614,7 +3675,8 @@
 +config SUSPEND2_EXPORTS
 +	bool
 +	depends on SUSPEND2_SWAP_EXPORTS || SUSPEND2_FILE_EXPORTS || \
-+		SUSPEND2_CRYPTO_EXPORTS || SUSPEND2_CLUSTER=m
++		SUSPEND2_CRYPTO_EXPORTS || SUSPEND2_CLUSTER=m || \
++		SUSPEND2_USERUI_EXPORTS
 +	default y
 +
 +config SUSPEND2
@@ -3622,10 +3684,10 @@
 +	depends on SUSPEND2_CORE!=n
 +	default y
 diff --git a/kernel/power/Makefile b/kernel/power/Makefile
-index 38725f5..79e78b7 100644
+index 38725f5..1e15b8d 100644
 --- a/kernel/power/Makefile
 +++ b/kernel/power/Makefile
-@@ -5,6 +5,30 @@ endif
+@@ -5,6 +5,32 @@ endif
  
  obj-y				:= main.o process.o console.o
  obj-$(CONFIG_PM_LEGACY)		+= pm.o
@@ -3654,15 +3716,17 @@
 +obj-$(CONFIG_SUSPEND2_FILE)	+= suspend_block_io.o suspend_file.o
 +obj-$(CONFIG_SUSPEND2_CLUSTER)	+= cluster.o
 +
++obj-$(CONFIG_SUSPEND2_USERUI)	+= suspend_userui.o
++
 +obj-$(CONFIG_SOFTWARE_SUSPEND)	+= swsusp.o disk.o swap.o user.o
  
  obj-$(CONFIG_MAGIC_SYSRQ)	+= poweroff.o
 diff --git a/kernel/power/atomic_copy.c b/kernel/power/atomic_copy.c
 new file mode 100644
-index 0000000..ab20796
+index 0000000..1e8a22a
 --- /dev/null
 +++ b/kernel/power/atomic_copy.c
-@@ -0,0 +1,407 @@
+@@ -0,0 +1,425 @@
 +/*
 + * kernel/power/atomic_copy.c
 + *
@@ -3831,7 +3895,7 @@
 +	if (suspend_activate_storage(1))
 +		panic("Failed to reactivate our storage.");
 +
-+	userui_redraw();
++	suspend_ui_redraw();
 +
 +	suspend_cond_pause(1, "About to reload secondary pagedir.");
 +
@@ -4007,22 +4071,36 @@
 +
 +	suspend2_running = 1;
 +
-+	suspend_prepare_status(DONT_CLEAR_BAR,	"Atomic restore preparation");
++	suspend_prepare_status(DONT_CLEAR_BAR,	"Prepare console");
 +
 +	if (test_action_state(SUSPEND_PM_PREPARE_CONSOLE))
 +		pm_prepare_console();
 +
++	if (!test_action_state(SUSPEND_LATE_CPU_HOTPLUG)) {
++		suspend_prepare_status(DONT_CLEAR_BAR,	"Disable nonboot cpus.");
++		disable_nonboot_cpus();
++	}
++
++	suspend_prepare_status(DONT_CLEAR_BAR,	"Freeze processes.");
++
 +	if ((error = freeze_processes())) {
 +		printk("Some processes failed to suspend\n");
 +		goto thaw_processes;
 +	}
 +
++	suspend_prepare_status(DONT_CLEAR_BAR,	"Device suspend.");
++
 +	if ((error = device_suspend(PMSG_FREEZE))) {
 +		printk("Some devices failed to suspend\n");
 +		goto device_resume;
 +	}
 +
-+	disable_nonboot_cpus();
++	if (test_action_state(SUSPEND_LATE_CPU_HOTPLUG)) {
++		suspend_prepare_status(DONT_CLEAR_BAR,	"Disable nonboot cpus.");
++		disable_nonboot_cpus();
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/linux-2.6-suspend2.patch?r1=1.1.2.2&r2=1.1.2.2.2.1&f=u



More information about the pld-cvs-commit mailing list