Commit 25761b6e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds

[PATCH] swsusp: move snapshot functionality to separate file

The following patch moves the functionality of swsusp related to creating and
handling the snapshot of memory to a separate file, snapshot.c

This should enable us to untangle the code in the future and eventually to
implement some parts of swsusp.c in the user space.

The patch does not change the code.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 351619ba
...@@ -74,4 +74,10 @@ void __restore_processor_state(struct saved_context *ctxt); ...@@ -74,4 +74,10 @@ void __restore_processor_state(struct saved_context *ctxt);
extern unsigned long get_usable_page(gfp_t gfp_mask); extern unsigned long get_usable_page(gfp_t gfp_mask);
extern void free_eaten_memory(void); extern void free_eaten_memory(void);
/*
* XXX: We try to keep some more pages free so that I/O operations succeed
* without paging. Might this be more?
*/
#define PAGES_FOR_IO 512
#endif /* _LINUX_SWSUSP_H */ #endif /* _LINUX_SWSUSP_H */
...@@ -4,7 +4,7 @@ EXTRA_CFLAGS += -DDEBUG ...@@ -4,7 +4,7 @@ EXTRA_CFLAGS += -DDEBUG
endif endif
obj-y := main.o process.o console.o pm.o obj-y := main.o process.o console.o pm.o
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o disk.o obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o disk.o snapshot.o
obj-$(CONFIG_SUSPEND_SMP) += smp.o obj-$(CONFIG_SUSPEND_SMP) += smp.o
......
...@@ -53,3 +53,20 @@ extern void thaw_processes(void); ...@@ -53,3 +53,20 @@ extern void thaw_processes(void);
extern int pm_prepare_console(void); extern int pm_prepare_console(void);
extern void pm_restore_console(void); extern void pm_restore_console(void);
/* References to section boundaries */
extern const void __nosave_begin, __nosave_end;
extern unsigned int nr_copy_pages;
extern suspend_pagedir_t *pagedir_nosave;
extern suspend_pagedir_t *pagedir_save;
extern asmlinkage int swsusp_arch_suspend(void);
extern asmlinkage int swsusp_arch_resume(void);
extern int restore_highmem(void);
extern void free_pagedir(struct pbe *pblist);
extern struct pbe * alloc_pagedir(unsigned nr_pages);
extern void create_pbe_list(struct pbe *pblist, unsigned nr_pages);
extern int enough_swap(void);
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment