SOURCES (LINUX_2_6_20): linux-2.6-suspend2.patch, linux-2.6-vs2.3....

mguevara mguevara at pld-linux.org
Mon Apr 16 14:57:27 CEST 2007


Author: mguevara                     Date: Mon Apr 16 12:57:27 2007 GMT
Module: SOURCES                       Tag: LINUX_2_6_20
---- Log message:
- linux-2.6-suspend2.patch updated to http://www.suspend2.net/downloads/all/suspend2-2.2.9.11-for-2.6.20.patch.bz2
- linux-2.6-vs2.3.patch and grsecurity-2.1.10-2.6.20.3.patch updated for new suspend2-2.2.9.11
- kernel-suspend2.config - added CONFIG_PRINTK_NOSAVE for suspend2-2.2.9.11

---- Files affected:
SOURCES:
   linux-2.6-suspend2.patch (1.1.2.1 -> 1.1.2.2) , linux-2.6-vs2.3.patch (1.2.2.55 -> 1.2.2.56) , grsecurity-2.1.10-2.6.20.3.patch (1.1.2.9 -> 1.1.2.10) , kernel-suspend2.config (1.1.2.4.2.1 -> 1.1.2.4.2.2) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-suspend2.patch
diff -u SOURCES/linux-2.6-suspend2.patch:1.1.2.1 SOURCES/linux-2.6-suspend2.patch:1.1.2.2
--- SOURCES/linux-2.6-suspend2.patch:1.1.2.1	Sat Feb 10 21:48:22 2007
+++ SOURCES/linux-2.6-suspend2.patch	Mon Apr 16 14:57:21 2007
@@ -10,7 +10,7 @@
  	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. 
+@@ -1099,6 +1100,8 @@ and is between 256 and 4096 characters. It is defined in the file
  	noresume	[SWSUSP] Disables resume and restores original swap
  			space.
  
@@ -19,7 +19,7 @@
  	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. 
+@@ -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
  
@@ -33,24 +33,72 @@
  
 diff --git a/Documentation/power/Suspend2-Changelog.txt b/Documentation/power/Suspend2-Changelog.txt
 new file mode 100644
-index 0000000..e0bd736
+index 0000000..58f82be
 --- /dev/null
 +++ b/Documentation/power/Suspend2-Changelog.txt
-@@ -0,0 +1,998 @@
+@@ -0,0 +1,1046 @@
 +Suspend2 changelog.
 +
 +Still to do prior to 2.2.10...
 +
-+- Test new code for more intelligent page freeing - per zone.
-+- Abort if fail to initialise encryption algo at resume time.
-+- Check encryption works.
 +- Double check OOM killer disabled while suspending.
-+- Remove RH copyrights - no RH invoices for Suspend2 work to date.
 +- RAID support.
-+- Block io mutex contention reduction.
-+- Complete improvements to highmem support - check what reworking
-+  of calculations needs to be done so we don't free more memory
-+  than necessary or (wrongly) fail to suspend.
++- Fix building core as a module for people who currently get a hang
++  while doing the atomic restore.
++
++2.2.9.11 - 14 April 2007
++- Remove RH copyrights - no Suspend2 work done in Redhat time to date.
++- Update copyrights to 2007.
++- Obfuscate my email address. I get enough spam already.
++- HighMem + core as module makes things unreliable at the moment. Temporarily
++  disable building the core as a module.
++- Only do 2 tries at eating memory. New code frees all freeable memory in one
++  try.
++- Tidy compression code initialisation and cleanup.
++- Correctly handle changed error codes from cryptoapi.
++- Free slab as well as pagecache when freeing memory.
++- Correct handling of io_mutex in worker_rw_loop error paths.
++- Remove unused counting of nr of pages read directly.
++- Remove unused x86 page protection code.
++- Stop always displaying image preparation statistics.
++- Remove unneeded zone index printk.
++- Clear some resume related state flags when finished resuming - stops us
++  powering down instead of aborting when user presses escape on attempt 2+.
++- Simplify code path for not running powerdown step at resume time.
++- Rename rw to writing in suspend_block_io.c
++- Add BUG_ON() to catch image header overwriting pageset2 (would have
++  simplified debugging the filewriter issue also fixed in this release).
++- Reset current_stream to 0 on completion of writing a pageset so the
++  above fix is not wrongly triggered.
++- Some coding style fixes.
++- Don't << devinfo.bmap_shift in filewriter considered whether we have
++  enough storage.
++- Modify order of setting suspend_fileops members from block writer to
++  match order in swapallocator.
++- Double checked that userui API version mismatches don't cause failures.
++- Removed encryption support. I don't believe there were many users, and
++  dm-crypt support can stil be utilised to encrypt the image without this.
++  Of course the real reason was programming issues :)
++- Added Rafael's kswap freezing fix.
++- Corrected compilation issue with page fault handling code.
++
++2.2.9.10 - 21 March 2007
++
++- Further post 2.2.9.4 bug fixes.
++
++2.2.9.9 - 12 March 2007
++
++- Further post 2.2.9.4 bug fixes. I've now been able to do 30 cycles on the
++  trot with multithreaded I/O and highmem.
++
++2.2.9.8 - 15 February 2007
++
++- Bug fixes.
++- Give earlier error messages for issues with reading the message.
++- Resume-time highmem bugfixing work.
++- Initial version of addition of warnings for drivers that lack .resume
++  methods. (dmesg | grep lacks)
++- Cleanup now unused readahead exports from block i/o code.
 +
 +2.2.9.7 - 8 February 2007
 +
@@ -2234,7 +2282,7 @@
 +   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 16c0e15..e7da20d 100644
+index 0ad8803..8a54929 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -3141,6 +3141,13 @@ M:	sammy at sammy.net
@@ -2251,11 +2299,54 @@
  SVGA HANDLING
  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
+--- a/arch/i386/mm/fault.c
++++ b/arch/i386/mm/fault.c
+@@ -23,6 +23,7 @@
+ #include <linux/module.h>
+ #include <linux/kprobes.h>
+ #include <linux/uaccess.h>
++#include <linux/suspend.h>
+ 
+ #include <asm/system.h>
+ #include <asm/desc.h>
+@@ -33,6 +34,9 @@ extern void die(const char *,struct pt_regs *,long);
+ 
+ static ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain);
+ 
++int suspend2_faulted = 0;
++EXPORT_SYMBOL(suspend2_faulted);
++
+ 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,
+ 
+ 	si_code = SEGV_MAPERR;
+ 
++	/* During a Suspend2 atomic copy, with DEBUG_SLAB, we will
++	 * get page faults where slab has been unmapped. Map them
++	 * temporarily and set the variable that tells Suspend2 to
++	 * unmap afterwards.
++	 */
++
++	if (unlikely(suspend2_running && !suspend2_faulted)) {
++		struct page *page = NULL;
++		suspend2_faulted = 1;
++		page = virt_to_page(address);
++		kernel_map_pages(page, 1, 1);
++		return;
++	}
++
+ 	/*
+ 	 * 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..611ed7e 100644
+index c5c5ea7..22bf577 100644
 --- a/arch/i386/mm/init.c
 +++ b/arch/i386/mm/init.c
-@@ -383,7 +383,7 @@ #ifdef CONFIG_X86_PAE
+@@ -383,7 +383,7 @@ static void __init pagetable_init (void)
  #endif
  }
  
@@ -2264,6 +2355,57 @@
  /*
   * 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)
+ 	unsigned long addr;
+ 
+ 	for (addr = begin; addr < end; addr += PAGE_SIZE) {
+-		ClearPageReserved(virt_to_page(addr));
+-		init_page_count(virt_to_page(addr));
++		//ClearPageReserved(virt_to_page(addr));
++		//init_page_count(virt_to_page(addr));
+ 		memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE);
+-		free_page(addr);
+-		totalram_pages++;
++		//free_page(addr);
++		//totalram_pages++;
+ 	}
+-	printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
++	//printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
+ }
+ 
+ void free_initmem(void)
+diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
+index ad91528..2e0f0f8 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)
+ 	 */
+ 	__flush_tlb_all();
+ }
++EXPORT_SYMBOL(kernel_map_pages);
+ #endif
+ 
++int page_is_mapped(struct page *page)
++{
++	pte_t *kpte; 
++	unsigned long address;
++	struct page *kpte_page;
++
++	if(PageHighMem(page))
++		return 0;
++
++	address = (unsigned long)page_address(page);
++
++	kpte = lookup_address(address);
++	if (!kpte)
++		return -EINVAL;
++	kpte_page = virt_to_page(kpte);
++
++	return (pte_val(*kpte) & (__PAGE_KERNEL_EXEC | __PAGE_KERNEL)) ? 1:0;
++}
+ EXPORT_SYMBOL(change_page_attr);
+ EXPORT_SYMBOL(global_flush_tlb);
++EXPORT_SYMBOL(page_is_mapped);
 diff --git a/arch/i386/power/Makefile b/arch/i386/power/Makefile
 index 2de7bbf..72a6169 100644
 --- a/arch/i386/power/Makefile
@@ -2276,7 +2418,7 @@
 index d2ded19..a5a5895 100644
 --- a/arch/powerpc/kernel/Makefile
 +++ b/arch/powerpc/kernel/Makefile
-@@ -35,7 +35,7 @@ obj-$(CONFIG_GENERIC_TBSYNC)	+= smp-tbsy
+@@ -35,7 +35,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
@@ -2317,26 +2459,11 @@
  }
 -#endif /* CONFIG_SOFTWARE_SUSPEND */
 +#endif /* CONFIG_SUSPEND_SHARED */
-diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
-index 5cc76d0..f78ac43 100644
---- a/arch/x86_64/kernel/time.c
-+++ b/arch/x86_64/kernel/time.c
-@@ -1070,9 +1070,9 @@ #ifdef CONFIG_X86_PM_TIMER
- #endif
- 	} else
- 		vxtime.last_tsc = get_cycles_sync();
--	write_sequnlock_irqrestore(&xtime_lock,flags);
- 	jiffies += sleep_length;
- 	monotonic_base += sleep_length * (NSEC_PER_SEC/HZ);
-+	write_sequnlock_irqrestore(&xtime_lock,flags);
- 	touch_softlockup_watchdog();
- 	return 0;
- }
 diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
-index fb67897..5b19efb 100644
+index 38c293b..1f0d329 100644
 --- a/block/ll_rw_blk.c
 +++ b/block/ll_rw_blk.c
-@@ -30,6 +30,8 @@ #include <linux/interrupt.h>
+@@ -30,6 +30,8 @@
  #include <linux/cpu.h>
  #include <linux/blktrace_api.h>
  #include <linux/fault-inject.h>
@@ -2357,15 +2484,16 @@
  }
  
 diff --git a/crypto/Kconfig b/crypto/Kconfig
-index 918b4d8..0eae3cb 100644
+index 92ba249..e3fbcfe 100644
 --- a/crypto/Kconfig
 +++ b/crypto/Kconfig
-@@ -390,6 +390,13 @@ config CRYPTO_DEFLATE
+@@ -439,6 +439,14 @@ config CRYPTO_DEFLATE
  	  
  	  You will most probably want this if using IPSec.
  
 +config CRYPTO_LZF
 +	tristate "LZF compression algorithm"
++	default y
 +	select CRYPTO_ALGAPI
 +	help
 +	  This is the LZF algorithm. It is especially useful for Suspend2,
@@ -2726,11 +2854,63 @@
 +MODULE_LICENSE("GPL");
 +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
+--- a/drivers/base/core.c
++++ b/drivers/base/core.c
+@@ -27,6 +27,8 @@
+ int (*platform_notify)(struct device * dev) = NULL;
+ int (*platform_notify_remove)(struct device * dev) = NULL;
+ 
++static int do_dump_stack;
++
+ /*
+  * sysfs bindings for devices.
+  */
+@@ -552,6 +554,18 @@ int device_add(struct device *dev)
+ 				class_intf->add_dev(dev, class_intf);
+ 		up(&dev->class->sem);
+ 	}
++
++#ifdef CONFIG_PM
++	if (!((dev->class && dev->class->resume) ||
++	      (dev->bus && (dev->bus->resume || dev->bus->resume_early))) &&
++	    !dev->pm_safe) {
++		printk("Device driver %s lacks bus and class support for "
++				"being resumed.\n", kobject_name(&dev->kobj));
++		if (do_dump_stack)
++			dump_stack();
++	}
++#endif
++
+  Done:
+  	kfree(class_name);
+ 	put_device(dev);
+@@ -851,6 +865,7 @@ struct device *device_create(struct class *class, struct device *parent,
+ 	dev->class = class;
+ 	dev->parent = parent;
+ 	dev->release = device_create_release;
++	dev->pm_safe = 1;
+ 
+ 	va_start(args, fmt);
+ 	vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args);
+@@ -1048,3 +1063,11 @@ out:
+ }
+ 
+ EXPORT_SYMBOL_GPL(device_move);
++
++static int __init pm_debug_dump_stack(char *str)
++{
++	do_dump_stack = 1;
++	return 1;
++}
++
++__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
 --- a/drivers/macintosh/via-pmu.c
 +++ b/drivers/macintosh/via-pmu.c
-@@ -42,7 +42,6 @@ #include <linux/init.h>
+@@ -42,7 +42,6 @@
  #include <linux/interrupt.h>
  #include <linux/device.h>
  #include <linux/sysdev.h>
@@ -2738,11 +2918,104 @@
  #include <linux/syscalls.h>
  #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
+--- 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)
+ 	if (error)
+ 		driver_unregister(&drv->driver);
+ 
++	if (!drv->resume)
++		printk("PCI driver %s lacks driver specific resume support.\n",
++				drv->name);
++
+ 	return error;
+ }
+ 
+diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
+index d6eb5ce..1edc9f5 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,
+ 		pr_info("%s: registered new device driver %s\n",
+ 			usbcore_name, new_udriver->name);
+ 		usbfs_update_special();
++		if (!new_udriver->resume)
++			printk("USB driver %s lacks resume support.\n",
++					new_udriver->name);
+ 	} else {
+ 		printk(KERN_ERR "%s: error %d registering device "
+ 			"	driver %s\n",
+diff --git a/include/asm-i386/cacheflush.h b/include/asm-i386/cacheflush.h
+index 74e03c8..3bb8575 100644
+--- a/include/asm-i386/cacheflush.h
++++ b/include/asm-i386/cacheflush.h
+@@ -36,4 +36,6 @@ void kernel_map_pages(struct page *page, int numpages, int enable);
+ void mark_rodata_ro(void);
+ #endif
+ 
++extern int page_is_mapped(struct page *page);
++
+ #endif /* _I386_CACHEFLUSH_H */
+diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h
+index 8dbaafe..e23fd20 100644
+--- a/include/asm-i386/suspend.h
++++ b/include/asm-i386/suspend.h
+@@ -8,6 +8,9 @@
+ 
+ static inline int arch_prepare_suspend(void) { return 0; }
+ 
++extern int suspend2_faulted;
++#define clear_suspend2_fault() do { suspend2_faulted = 0; } while(0)
++
+ /* image of the saved processor state */
+ struct saved_context {
+   	u16 es, fs, gs, ss;
+diff --git a/include/asm-ppc/suspend.h b/include/asm-ppc/suspend.h
+index 3df9f32..9d5db0e 100644
+--- a/include/asm-ppc/suspend.h
++++ b/include/asm-ppc/suspend.h
+@@ -10,3 +10,6 @@ static inline void save_processor_state(void)
+ static inline void restore_processor_state(void)
+ {
+ }
++
++#define suspend2_faulted (0)
++#define clear_suspend2_fault() do { } while(0)
+diff --git a/include/asm-x86_64/cacheflush.h b/include/asm-x86_64/cacheflush.h
+index ab1cb5c..b8e7def 100644
+--- a/include/asm-x86_64/cacheflush.h
++++ b/include/asm-x86_64/cacheflush.h
+@@ -32,4 +32,9 @@ int change_page_attr_addr(unsigned long addr, int numpages, pgprot_t prot);
+ void mark_rodata_ro(void);
+ #endif
+ 
++static inline int page_is_mapped(struct page *page)
++{
++	return 1;
++}
++
+ #endif /* _X8664_CACHEFLUSH_H */
+diff --git a/include/asm-x86_64/suspend.h b/include/asm-x86_64/suspend.h
+index bc7f817..2f18e1b 100644
+--- a/include/asm-x86_64/suspend.h
++++ b/include/asm-x86_64/suspend.h
+@@ -12,6 +12,9 @@ arch_prepare_suspend(void)
+ 	return 0;
+ }
+ 
++#define suspend2_faulted (0)
++#define clear_suspend2_fault() do { } while(0)
++
+ /* Image of the saved processor state. If you touch this, fix acpi_wakeup.S. */
+ struct saved_context {
+   	u16 ds, es, fs, gs, ss;
 diff --git a/include/linux/bio.h b/include/linux/bio.h
 index 08daf32..8552932 100644
 --- a/include/linux/bio.h
 +++ b/include/linux/bio.h
-@@ -125,6 +125,7 @@ #define BIO_CLONED	4	/* doesn't own data
+@@ -125,6 +125,7 @@ struct bio {
  #define BIO_BOUNCED	5	/* bio is a bounce bio */
  #define BIO_USER_MAPPED 6	/* contains user pages */
  #define BIO_EOPNOTSUPP	7	/* not supported */
@@ -2750,6 +3023,18 @@
  #define bio_flagged(bio, flag)	((bio)->bi_flags & (1 << (flag)))
  
  /*
+diff --git a/include/linux/device.h b/include/linux/device.h
+index f44247f..bca61a0 100644
+--- a/include/linux/device.h
++++ b/include/linux/device.h
+@@ -356,6 +356,7 @@ struct device {
+ 	struct kobject kobj;
+ 	char	bus_id[BUS_ID_SIZE];	/* position on parent bus */
+ 	unsigned		is_registered:1;
++	unsigned		pm_safe:1; /* No resume fn is ok? */
+ 	struct device_attribute uevent_attr;
+ 	struct device_attribute *devt_attr;
+ 
 diff --git a/include/linux/dyn_pageflags.h b/include/linux/dyn_pageflags.h
 new file mode 100644
 index 0000000..23d9127
@@ -2859,7 +3144,7 @@
  #else
  static inline int frozen(struct task_struct *p) { return 0; }
  static inline int freezing(struct task_struct *p) { return 0; }
-@@ -85,6 +100,9 @@ static inline int freeze_processes(void)
+@@ -85,6 +100,9 @@ static inline int freeze_processes(void) { BUG(); return 0; }
  static inline void thaw_processes(void) {}
  
  static inline int try_to_freeze(void) { return 0; }
@@ -2873,7 +3158,7 @@
 index 63fb18d..161c54e 100644
 --- a/include/linux/kernel.h
 +++ b/include/linux/kernel.h
-@@ -118,6 +118,8 @@ extern int vsprintf(char *buf, const cha
+@@ -118,6 +118,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)));
@@ -2886,7 +3171,7 @@
 index b3b9b60..dbf46f0 100644
 --- a/include/linux/netlink.h
 +++ b/include/linux/netlink.h
-@@ -23,6 +23,8 @@ #define NETLINK_KOBJECT_UEVENT	15	/* Ker
+@@ -23,6 +23,8 @@
  #define NETLINK_GENERIC		16
  /* leave room for NETLINK_DM (DM Events) */
  #define NETLINK_SCSITRANSPORT	18	/* SCSI Transports */
@@ -2896,10 +3181,10 @@
  #define MAX_LINKS 32		
  
 diff --git a/include/linux/suspend.h b/include/linux/suspend.h
-index bf99bd4..b5475f3 100644
+index bf99bd4..8840f4b 100644
 --- a/include/linux/suspend.h
 +++ b/include/linux/suspend.h
-@@ -27,14 +27,9 @@ #ifdef CONFIG_PM
+@@ -27,14 +27,9 @@ extern void mark_free_pages(struct zone *zone);
  /* kernel/power/swsusp.c */
  extern int software_suspend(void);
  
@@ -2914,7 +3199,7 @@
  static inline int software_suspend(void)
  {
  	printk("Warning: fake suspend called\n");
-@@ -45,8 +40,6 @@ #endif /* CONFIG_PM */
+@@ -45,8 +40,6 @@ static inline int software_suspend(void)
  void save_processor_state(void);
  void restore_processor_state(void);
  struct saved_context;
@@ -2923,7 +3208,7 @@
  unsigned long get_safe_page(gfp_t gfp_mask);
  
  /*
-@@ -55,4 +48,58 @@ unsigned long get_safe_page(gfp_t gfp_ma
+@@ -55,4 +48,69 @@ unsigned long get_safe_page(gfp_t gfp_mask);
   */
  #define PAGES_FOR_IO	1024
  
@@ -2944,6 +3229,8 @@
 +	SUSPEND_TRYING_TO_RESUME,
 +	SUSPEND_TRY_RESUME_RD,
 +	SUSPEND_LOADING_ALT_IMAGE,
++	SUSPEND_STOP_RESUME,
++	SUSPEND_IO_STOPPED,
 +};
 +
 +#ifdef CONFIG_SUSPEND2
@@ -2956,6 +3243,7 @@
 +#define test_suspend_state(bit) (test_bit(bit, &suspend_state))
 +
 +extern void suspend2_try_resume(void);
++extern int suspend2_running;
 +#else
 +
 +#define suspend_state		(0)
@@ -2963,6 +3251,8 @@
 +#define clear_suspend_state(bit) do { } while (0)
 +#define test_suspend_state(bit) (0)
 +
++#define suspend2_running (0)
++
 +#define suspend2_try_resume() do { } while(0)
 +#endif /* CONFIG_SUSPEND2 */
 +
@@ -2981,6 +3271,12 @@
 +#endif
 +#endif
 +
++#ifdef CONFIG_PRINTK_NOSAVE
++#define POSS_NOSAVE __nosavedata
++#else
++#define POSS_NOSAVE
++#endif
++
  #endif /* _LINUX_SWSUSP_H */
 diff --git a/include/linux/swap.h b/include/linux/swap.h
 index 5423559..9d01fd5 100644
@@ -2994,7 +3290,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 @@ #define has_swap_token(x) 0
+@@ -366,5 +367,10 @@ static inline swp_entry_t get_swap_page(void)
  #define disable_swap_token() do { } while(0)
  
  #endif /* CONFIG_SWAP */
@@ -3028,7 +3324,7 @@
  		goto out;
  #endif
  
-@@ -195,7 +200,8 @@ #endif
+@@ -195,7 +200,8 @@ dev_t name_to_dev_t(char *name)
  	res = try_name(s, part);
  done:
  #ifdef CONFIG_SYSFS
@@ -3070,7 +3366,7 @@
 index 2cfd7cb..06584f2 100644
 --- a/init/do_mounts_initrd.c
 +++ b/init/do_mounts_initrd.c
-@@ -6,6 +6,7 @@ #include <linux/ext2_fs.h>
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/linux-2.6-suspend2.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/SOURCES/linux-2.6-vs2.3.patch?r1=1.2.2.55&r2=1.2.2.56&f=u
    http://cvs.pld-linux.org/SOURCES/grsecurity-2.1.10-2.6.20.3.patch?r1=1.1.2.9&r2=1.1.2.10&f=u
    http://cvs.pld-linux.org/SOURCES/kernel-suspend2.config?r1=1.1.2.4.2.1&r2=1.1.2.4.2.2&f=u



More information about the pld-cvs-commit mailing list