SOURCES (LINUX_2_6): linux-2.6-suspend2.patch, kernel-suspend2-headers.patc...

lmasko lmasko at pld-linux.org
Thu Jan 15 13:52:36 CET 2009


Author: lmasko                       Date: Thu Jan 15 12:52:36 2009 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- TuxOnIce patches up to 3.0-rc8.

---- Files affected:
SOURCES:
   linux-2.6-suspend2.patch (1.1.2.2.2.13 -> 1.1.2.2.2.14) , kernel-suspend2-headers.patch (1.1.2.9 -> 1.1.2.10) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-suspend2.patch
diff -u SOURCES/linux-2.6-suspend2.patch:1.1.2.2.2.13 SOURCES/linux-2.6-suspend2.patch:1.1.2.2.2.14
--- SOURCES/linux-2.6-suspend2.patch:1.1.2.2.2.13	Wed Dec 31 17:23:29 2008
+++ SOURCES/linux-2.6-suspend2.patch	Thu Jan 15 13:52:29 2009
@@ -1252,6 +1252,18 @@
  U14-34F SCSI DRIVER
  P:	Dario Ballabio
  M:	ballabio_dario at emc.com
+diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
+index c31d6d2..7a6a924 100644
+--- a/arch/powerpc/mm/pgtable_32.c
++++ b/arch/powerpc/mm/pgtable_32.c
+@@ -397,6 +397,7 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
+ 
+ 	change_page_attr(page, numpages, enable ? PAGE_KERNEL : __pgprot(0));
+ }
++EXPORT_SYMBOL_GPL(kernel_map_pages);
+ #endif /* CONFIG_DEBUG_PAGEALLOC */
+ 
+ static int fixmaps;
 diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
 index cc5a254..1216ab3 100644
 --- a/arch/x86/kernel/reboot.c
@@ -1264,6 +1276,27 @@
  
  void machine_halt(void)
  {
+diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
+index e89d248..7fb630d 100644
+--- a/arch/x86/mm/pageattr.c
++++ b/arch/x86/mm/pageattr.c
+@@ -1116,6 +1116,7 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
+ 	 */
+ 	__flush_tlb_all();
+ }
++EXPORT_SYMBOL_GPL(kernel_map_pages);
+ 
+ #ifdef CONFIG_HIBERNATION
+ 
+@@ -1130,7 +1131,7 @@ bool kernel_page_present(struct page *page)
+ 	pte = lookup_address((unsigned long)page_address(page), &level);
+ 	return (pte_val(*pte) & _PAGE_PRESENT);
+ }
+-
++EXPORT_SYMBOL_GPL(kernel_page_present);
+ #endif /* CONFIG_HIBERNATION */
+ 
+ #endif /* CONFIG_DEBUG_PAGEALLOC */
 diff --git a/arch/x86/power/cpu_64.c b/arch/x86/power/cpu_64.c
 index e3b6cf7..bdd74a8 100644
 --- a/arch/x86/power/cpu_64.c
@@ -1693,18 +1726,10 @@
 +MODULE_DESCRIPTION("LZF Compression Algorithm");
 +MODULE_AUTHOR("Marc Alexander Lehmann & Nigel Cunningham");
 diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
-index 692c20b..a39a294 100644
+index 692c20b..b7dfeea 100644
 --- a/drivers/base/power/main.c
 +++ b/drivers/base/power/main.c
-@@ -23,6 +23,7 @@
- #include <linux/pm.h>
- #include <linux/resume-trace.h>
- #include <linux/rwsem.h>
-+#include <linux/suspend.h>
- 
- #include "../base.h"
- #include "power.h"
-@@ -54,6 +55,7 @@ void device_pm_lock(void)
+@@ -54,6 +54,7 @@ void device_pm_lock(void)
  {
  	mutex_lock(&dpm_list_mtx);
  }
@@ -1712,7 +1737,7 @@
  
  /**
   *	device_pm_unlock - unlock the list of active devices used by the PM core
-@@ -62,6 +64,7 @@ void device_pm_unlock(void)
+@@ -62,6 +63,7 @@ void device_pm_unlock(void)
  {
  	mutex_unlock(&dpm_list_mtx);
  }
@@ -2311,78 +2336,6 @@
  int fsync_super(struct super_block *);
  int fsync_no_super(struct block_device *);
  struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
-diff --git a/include/linux/dyn_pageflags.h b/include/linux/dyn_pageflags.h
-new file mode 100644
-index 0000000..143ec39
---- /dev/null
-+++ b/include/linux/dyn_pageflags.h
-@@ -0,0 +1,66 @@
-+/*
-+ * include/linux/dyn_pageflags.h
-+ *
-+ * Copyright (C) 2004-2008 Nigel Cunningham <nigel at tuxonice net>
-+ *
-+ * This file is released under the GPLv2.
-+ *
-+ * It implements support for dynamically allocated bitmaps that are
-+ * used for temporary or infrequently used pageflags, in lieu of
-+ * bits in the struct page flags entry.
-+ */
-+
-+#ifndef DYN_PAGEFLAGS_H
-+#define DYN_PAGEFLAGS_H
-+
-+#include <linux/mm.h>
-+
-+struct dyn_pageflags {
-+	unsigned long ****bitmap; /* [pg_dat][zone][page_num] */
-+	int sparse, initialised;
-+	struct list_head list;
-+	spinlock_t struct_lock;
-+};
-+
-+#define DYN_PAGEFLAGS_INIT(name) { \
-+	.list = LIST_HEAD_INIT(name.list), \
-+	.struct_lock = __SPIN_LOCK_UNLOCKED(name.lock) \
-+}
-+
-+#define DECLARE_DYN_PAGEFLAGS(name) \
-+	struct dyn_pageflags name = DYN_PAGEFLAGS_INIT(name);
-+
-+#define BITMAP_FOR_EACH_SET(BITMAP, CTR) \
-+	for (CTR = get_next_bit_on(BITMAP, max_pfn + 1); CTR <= max_pfn; \
-+		CTR = get_next_bit_on(BITMAP, CTR))
-+
-+extern void clear_dyn_pageflags(struct dyn_pageflags *pagemap);
-+extern int allocate_dyn_pageflags(struct dyn_pageflags *pagemap, int sparse);
-+extern void free_dyn_pageflags(struct dyn_pageflags *pagemap);
-+extern unsigned long get_next_bit_on(struct dyn_pageflags *bitmap,
-+	unsigned long counter);
-+
-+extern int test_dynpageflag(struct dyn_pageflags *bitmap, struct page *page);
-+/*
-+ * In sparse bitmaps, setting a flag can fail (we can fail to allocate
-+ * the page to store the bit. If this happens, we will BUG(). If you don't
-+ * want this behaviour, don't allocate sparse pageflags.
-+ */
-+extern void set_dynpageflag(struct dyn_pageflags *bitmap, struct page *page);
-+extern void clear_dynpageflag(struct dyn_pageflags *bitmap, struct page *page);
-+extern void dump_pagemap(struct dyn_pageflags *pagemap);
-+
-+/*
-+ * With the above macros defined, you can do...
-+ * #define PagePageset1(page) (test_dynpageflag(&pageset1_map, page))
-+ * #define SetPagePageset1(page) (set_dynpageflag(&pageset1_map, page))
-+ * #define ClearPagePageset1(page) (clear_dynpageflag(&pageset1_map, page))
-+ */
-+
-+extern void __init dyn_pageflags_init(void);
-+extern void __init dyn_pageflags_use_kzalloc(void);
-+
-+#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
-+extern void dyn_pageflags_hotplug(struct zone *zone);
-+#endif
-+#endif
 diff --git a/include/linux/freezer.h b/include/linux/freezer.h
 index 5a361f8..c775cd1 100644
 --- a/include/linux/freezer.h
@@ -2488,10 +2441,10 @@
  #define MAX_LINKS 32		
  
 diff --git a/include/linux/suspend.h b/include/linux/suspend.h
-index 2ce8207..3c64844 100644
+index 2ce8207..f469faf 100644
 --- a/include/linux/suspend.h
 +++ b/include/linux/suspend.h
-@@ -280,4 +280,69 @@ static inline void register_nosave_region_late(unsigned long b, unsigned long e)
+@@ -280,4 +280,70 @@ static inline void register_nosave_region_late(unsigned long b, unsigned long e)
  
  extern struct mutex pm_mutex;
  
@@ -2512,6 +2465,7 @@
 +	TOI_IO_STOPPED,
 +	TOI_NOTIFIERS_PREPARE,
 +	TOI_CLUSTER_MODE,
++	TOI_BOOT_KERNEL,
 +};
 +
 +#ifdef CONFIG_TOI
@@ -2562,7 +2516,7 @@
 +#endif
  #endif /* _LINUX_SUSPEND_H */
 diff --git a/include/linux/swap.h b/include/linux/swap.h
-index a3af95b..38be018 100644
+index a3af95b..e168ed5 100644
 --- a/include/linux/swap.h
 +++ b/include/linux/swap.h
 @@ -165,6 +165,7 @@ extern unsigned long totalram_pages;
@@ -2573,26 +2527,6 @@
  extern unsigned int nr_free_pagecache_pages(void);
  
  /* Definition of global_page_state not available yet */
-@@ -216,6 +217,8 @@ extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
- 							gfp_t gfp_mask);
- extern int __isolate_lru_page(struct page *page, int mode, int file);
- extern unsigned long shrink_all_memory(unsigned long nr_pages);
-+extern void shrink_one_zone(struct zone *zone, unsigned long desired_size,
-+		int ps_wanted);
- extern int vm_swappiness;
- extern int remove_mapping(struct address_space *mapping, struct page *page);
- extern long vm_total_pages;
-@@ -416,5 +419,10 @@ static inline swp_entry_t get_swap_page(void)
- #define disable_swap_token() do { } while(0)
- 
- #endif /* CONFIG_SWAP */
-+
-+/* For TuxOnIce - unlink LRU pages while saving separately */
-+void unlink_lru_lists(void);
-+void relink_lru_lists(void);
-+
- #endif /* __KERNEL__*/
- #endif /* _LINUX_SWAP_H */
 diff --git a/init/do_mounts.c b/init/do_mounts.c
 index d055b19..06efbe5 100644
 --- a/init/do_mounts.c
@@ -2639,44 +2573,28 @@
  	sys_fchdir(old_fd);
  	sys_mount("/", ".", NULL, MS_MOVE, NULL);
 diff --git a/init/main.c b/init/main.c
-index 7e117a2..fed41ad 100644
+index 7e117a2..63758ff 100644
 --- a/init/main.c
 +++ b/init/main.c
-@@ -59,6 +59,7 @@
- #include <linux/pid_namespace.h>
- #include <linux/device.h>
- #include <linux/kthread.h>
-+#include <linux/dyn_pageflags.h>
- #include <linux/sched.h>
- #include <linux/signal.h>
- #include <linux/idr.h>
-@@ -610,6 +611,7 @@ asmlinkage void __init start_kernel(void)
- 	softirq_init();
- 	timekeeping_init();
- 	time_init();
-+	dyn_pageflags_init();
- 	sched_clock_init();
- 	profile_init();
- 	if (!irqs_disabled())
-@@ -653,6 +655,7 @@ asmlinkage void __init start_kernel(void)
- 	enable_debug_pagealloc();
- 	cpu_hotplug_init();
- 	kmem_cache_init();
-+	dyn_pageflags_use_kzalloc();
- 	debug_objects_mem_init();
- 	idr_init_cache();
- 	setup_per_cpu_pageset();
+@@ -123,6 +123,7 @@ extern void softirq_init(void);
+ char __initdata boot_command_line[COMMAND_LINE_SIZE];
+ /* Untouched saved command line (eg. for /proc) */
+ char *saved_command_line;
++EXPORT_SYMBOL_GPL(saved_command_line);
+ /* Command line for parameter parsing */
+ static char *static_command_line;
+ 
 diff --git a/kernel/cpu.c b/kernel/cpu.c
-index 8ea32e8..9ca7d5e 100644
+index 8ea32e8..bf3c78f 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -363,6 +363,7 @@ out_notify:
- 
- 	return ret;
+@@ -428,6 +428,7 @@ int disable_nonboot_cpus(void)
+ 	cpu_maps_update_done();
+ 	return error;
  }
 +EXPORT_SYMBOL_GPL(disable_nonboot_cpus);
  
- int __cpuinit cpu_up(unsigned int cpu)
+ void __ref enable_nonboot_cpus(void)
  {
 @@ -452,6 +453,7 @@ void __ref enable_nonboot_cpus(void)
  out:
@@ -2719,7 +2637,7 @@
  static void helper_lock(void)
  {
 diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
-index 23bd4da..ee097f4 100644
+index 23bd4da..3e39c7c 100644
 --- a/kernel/power/Kconfig
 +++ b/kernel/power/Kconfig
 @@ -38,6 +38,13 @@ config CAN_PM_TRACE
@@ -2736,7 +2654,7 @@
  config PM_TRACE
  	bool
  	help
-@@ -179,6 +186,264 @@ config PM_STD_PARTITION
+@@ -179,6 +186,256 @@ config PM_STD_PARTITION
  	  suspended image to. It will simply pick the first available swap 
  	  device.
  
@@ -2978,13 +2896,6 @@
 +		  always says no pages were resaved, you may be able to safely disable this
 +		  option.
 +
-+	config	TOI_PAGEFLAGS_TEST
-+		tristate "Test pageflags"
-+		default N
-+		depends on TOI_CORE
-+		help
-+		  Test pageflags.
-+
 +config TOI
 +	bool
 +	depends on TOI_CORE!=n
@@ -2994,18 +2905,17 @@
 +	bool
 +	depends on TOI_SWAP=m || TOI_FILE=m || \
 +		TOI_CRYPTO=m || TOI_CLUSTER=m || \
-+		TOI_USERUI=m || TOI_PAGEFLAGS=m || \
-+		TOI_CORE=m
++		TOI_USERUI=m || TOI_CORE=m
 +	default y
 +
  config APM_EMULATION
  	tristate "Advanced Power Management Emulation"
  	depends on PM && SYS_SUPPORTS_APM_EMULATION
 diff --git a/kernel/power/Makefile b/kernel/power/Makefile
-index 597823b..6d44035 100644
+index 597823b..61d7360 100644
 --- a/kernel/power/Makefile
 +++ b/kernel/power/Makefile
-@@ -4,6 +4,37 @@ EXTRA_CFLAGS	+=	-DDEBUG
+@@ -4,6 +4,35 @@ EXTRA_CFLAGS	+=	-DDEBUG
  endif
  
  obj-y				:= main.o
@@ -3038,8 +2948,6 @@
 +
 +obj-$(CONFIG_TOI_USERUI)	+= tuxonice_userui.o
 +
-+obj-$(CONFIG_TOI_PAGEFLAGS_TEST)	+= toi_pageflags_test.o
-+
  obj-$(CONFIG_PM_SLEEP)		+= process.o console.o
  obj-$(CONFIG_HIBERNATION)	+= swsusp.o disk.o snapshot.o swap.o user.o
  
@@ -3062,13 +2970,14 @@
 +EXPORT_SYMBOL_GPL(pm_restore_console);
  #endif
 diff --git a/kernel/power/disk.c b/kernel/power/disk.c
-index c9d7408..e0d3036 100644
+index c9d7408..daa8a86 100644
 --- a/kernel/power/disk.c
 +++ b/kernel/power/disk.c
-@@ -26,9 +26,12 @@
+@@ -25,10 +25,12 @@
+ #include <linux/ftrace.h>
  
  #include "power.h"
- 
+-
 +#include "tuxonice.h"
  
  static int noresume = 0;
@@ -3079,7 +2988,7 @@
  dev_t swsusp_resume_device;
  sector_t swsusp_resume_block;
  
-@@ -106,55 +109,60 @@ static int hibernation_test(int level) { return 0; }
+@@ -106,55 +108,60 @@ static int hibernation_test(int level) { return 0; }
   *	hibernation
   */
  
@@ -3145,7 +3054,7 @@
  
  /**
   *	platform_pre_restore - prepare the platform for the restoration from a
-@@ -162,11 +170,12 @@ static void platform_finish(int platform_mode)
+@@ -162,11 +169,12 @@ static void platform_finish(int platform_mode)
   *	called, platform_restore_cleanup() must be called.
   */
  
@@ -3159,7 +3068,7 @@
  
  /**
   *	platform_restore_cleanup - switch the platform to the normal mode of
-@@ -175,22 +184,24 @@ static int platform_pre_restore(int platform_mode)
+@@ -175,22 +183,24 @@ static int platform_pre_restore(int platform_mode)
   *	regardless of the result of platform_pre_restore().
   */
  
@@ -3186,7 +3095,7 @@
  
  /**
   *	create_image - freeze devices that need to be frozen with interrupts
-@@ -394,6 +405,7 @@ int hibernation_restore(int platform_mode)
+@@ -394,6 +404,7 @@ int hibernation_restore(int platform_mode)
  	pm_restore_console();
  	return error;
  }
@@ -3194,7 +3103,7 @@
  
  /**
   *	hibernation_platform_enter - enter the hibernation state using the
-@@ -509,6 +521,9 @@ int hibernate(void)
+@@ -509,6 +520,9 @@ int hibernate(void)
  {
  	int error;
  
@@ -3204,7 +3113,7 @@
  	mutex_lock(&pm_mutex);
  	/* The snapshot device should not be opened while we're running */
  	if (!atomic_add_unless(&snapshot_device_available, -1, 0)) {
-@@ -586,10 +601,19 @@ int hibernate(void)
+@@ -586,10 +600,19 @@ int hibernate(void)
   *
   */
  
@@ -3225,7 +3134,7 @@
  
  	/*
  	 * name_to_dev_t() below takes a sysfs buffer mutex when sysfs
-@@ -893,6 +917,7 @@ static int __init resume_offset_setup(char *str)
+@@ -893,6 +916,7 @@ static int __init resume_offset_setup(char *str)
  static int __init noresume_setup(char *str)
  {
  	noresume = 1;
@@ -3280,10 +3189,10 @@
  /**
   *	state - control system power state.
 diff --git a/kernel/power/power.h b/kernel/power/power.h
-index 46b5ec7..647841a 100644
+index 46b5ec7..4cfac49 100644
 --- a/kernel/power/power.h
 +++ b/kernel/power/power.h
-@@ -1,7 +1,16 @@
+@@ -1,3 +1,10 @@
 +/*
 + * Copyright (C) 2004-2008 Nigel Cunningham (nigel at tuxonice net)
 + */
@@ -3294,13 +3203,7 @@
  #include <linux/suspend.h>
  #include <linux/suspend_ioctls.h>
  #include <linux/utsname.h>
- #include <linux/freezer.h>
-+#include "tuxonice.h"
-+#include "tuxonice_builtin.h"
- 
- struct swsusp_info {
- 	struct new_utsname	uts;
-@@ -21,18 +30,22 @@ struct swsusp_info {
+@@ -21,18 +28,22 @@ struct swsusp_info {
  extern int arch_hibernation_header_save(void *addr, unsigned int max_size);
  extern int arch_hibernation_header_restore(void *addr);
  
@@ -3325,7 +3228,7 @@
  /*
   * Keep some memory free so that I/O operations can succeed without paging
   * [Might this be more than 4 MB?]
-@@ -49,6 +62,7 @@ static inline char *check_image_kernel(struct swsusp_info *info)
+@@ -49,6 +60,7 @@ static inline char *check_image_kernel(struct swsusp_info *info)
  extern int hibernation_snapshot(int platform_mode);
  extern int hibernation_restore(int platform_mode);
  extern int hibernation_platform_enter(void);
@@ -3333,7 +3236,7 @@
  #endif
  
  extern int pfn_is_nosave(unsigned long);
-@@ -63,6 +77,8 @@ static struct kobj_attribute _name##_attr = {	\
+@@ -63,6 +75,8 @@ static struct kobj_attribute _name##_attr = {	\
  	.store	= _name##_store,		\
  }
  
@@ -3342,7 +3245,7 @@
  /* Preferred image size in bytes (default 500 MB) */
  extern unsigned long image_size;
  extern int in_suspend;
-@@ -223,3 +239,32 @@ static inline void suspend_thaw_processes(void)
+@@ -223,3 +237,90 @@ static inline void suspend_thaw_processes(void)
  {
  }
  #endif
@@ -3374,6 +3277,64 @@
 +
 +#define ZONE_START(thiszone) ((thiszone)->zone_start_pfn - PHYS_PFN_OFFSET)
 +
++#define BM_END_OF_MAP	(~0UL)
++
++#define BM_BITS_PER_BLOCK	(PAGE_SIZE << 3)
++
++struct bm_block {
++	struct bm_block *next;		/* next element of the list */
++	unsigned long start_pfn;	/* pfn represented by the first bit */
++	unsigned long end_pfn;	/* pfn represented by the last bit plus 1 */
++	unsigned long *data;	/* bitmap representing pages */
++};
++
++struct zone_bitmap {
++	struct zone_bitmap *next;	/* next element of the list */
++	unsigned long start_pfn;	/* minimal pfn in this zone */
++	unsigned long end_pfn;		/* maximal pfn in this zone plus 1 */
++	struct bm_block *bm_blocks;	/* list of bitmap blocks */
++	struct bm_block *cur_block;	/* recently used bitmap block */
++};
++
++/* strcut bm_position is used for browsing memory bitmaps */
++
++struct bm_position {
++	struct zone_bitmap *zone_bm;
++	struct bm_block *block;
++	int bit;
++};
++
++struct memory_bitmap {
++	struct zone_bitmap *zone_bm_list;	/* list of zone bitmaps */
++	struct linked_page *p_list;	/* list of pages used to store zone
++					 * bitmap objects and bitmap block
++					 * objects
++					 */
++	struct bm_position cur;	/* most recently used bit position */
++};
++
++extern int memory_bm_create(struct memory_bitmap *bm, gfp_t gfp_mask,
++		int safe_needed);
++extern void memory_bm_free(struct memory_bitmap *bm, int clear_nosave_free);
++extern void memory_bm_set_bit(struct memory_bitmap *bm, unsigned long pfn);
++extern void memory_bm_clear_bit(struct memory_bitmap *bm, unsigned long pfn);
++extern int memory_bm_test_bit(struct memory_bitmap *bm, unsigned long pfn);
++extern unsigned long memory_bm_next_pfn(struct memory_bitmap *bm);
++extern void memory_bm_position_reset(struct memory_bitmap *bm);
++extern void memory_bm_clear(struct memory_bitmap *bm);
++extern void memory_bm_copy(struct memory_bitmap *source,
++		struct memory_bitmap *dest);
++extern void memory_bm_dup(struct memory_bitmap *source,
++		struct memory_bitmap *dest);
++
++#ifdef CONFIG_TOI
++struct toi_module_ops;
++extern int memory_bm_read(struct memory_bitmap *bm, int (*rw_chunk)
++	(int rw, struct toi_module_ops *owner, char *buffer, int buffer_size));
++extern int memory_bm_write(struct memory_bitmap *bm, int (*rw_chunk)
++	(int rw, struct toi_module_ops *owner, char *buffer, int buffer_size));
++#endif
++
 +#endif
 diff --git a/kernel/power/process.c b/kernel/power/process.c
 index ca63401..ac19ff7 100644
@@ -3479,7 +3440,7 @@
 + */
 +EXPORT_SYMBOL_GPL(thaw_kernel_threads);
 diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
-index 5d2ab83..4a51893 100644
+index 5d2ab83..8fc59e9 100644
 --- a/kernel/power/snapshot.c
 +++ b/kernel/power/snapshot.c
 @@ -33,6 +33,8 @@
@@ -3512,28 +3473,340 @@
  	return (unsigned long)get_image_page(gfp_mask, PG_SAFE);
  }
  
-@@ -561,18 +570,8 @@ static unsigned long memory_bm_next_pfn(struct memory_bitmap *bm)
+@@ -228,50 +237,14 @@ static void chain_free(struct chain_allocator *ca, int clear_page_nosave)
+  *	the represented memory area.
+  */
+ 
+-#define BM_END_OF_MAP	(~0UL)
+-
+-#define BM_BITS_PER_BLOCK	(PAGE_SIZE << 3)
+-
+-struct bm_block {
+-	struct bm_block *next;		/* next element of the list */
+-	unsigned long start_pfn;	/* pfn represented by the first bit */
+-	unsigned long end_pfn;	/* pfn represented by the last bit plus 1 */
+-	unsigned long *data;	/* bitmap representing pages */
+-};
+-
+ static inline unsigned long bm_block_bits(struct bm_block *bb)
+ {
+ 	return bb->end_pfn - bb->start_pfn;
+ }
+ 
+-struct zone_bitmap {
+-	struct zone_bitmap *next;	/* next element of the list */
+-	unsigned long start_pfn;	/* minimal pfn in this zone */
+-	unsigned long end_pfn;		/* maximal pfn in this zone plus 1 */
+-	struct bm_block *bm_blocks;	/* list of bitmap blocks */
+-	struct bm_block *cur_block;	/* recently used bitmap block */
+-};
+-
+-/* strcut bm_position is used for browsing memory bitmaps */
+-
+-struct bm_position {
+-	struct zone_bitmap *zone_bm;
+-	struct bm_block *block;
+-	int bit;
+-};
+-
+-struct memory_bitmap {
+-	struct zone_bitmap *zone_bm_list;	/* list of zone bitmaps */
+-	struct linked_page *p_list;	/* list of pages used to store zone
+-					 * bitmap objects and bitmap block
+-					 * objects
+-					 */
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/linux-2.6-suspend2.patch?r1=1.1.2.2.2.13&r2=1.1.2.2.2.14&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-suspend2-headers.patch?r1=1.1.2.9&r2=1.1.2.10&f=u



More information about the pld-cvs-commit mailing list