X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fsuspend.h;h=bf99bd49f8efd3af5f13004ca3c84c57bc532e91;hb=bbf2f9fb1c7239ae0aea55f7cb1555f4adc15f76;hp=96e31aa64cc7c152f17e182b34801de452004e75;hpb=5047f09b56d0bc3c21aec9cb16de60283da645c6;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 96e31aa64cc..bf99bd49f8e 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -9,30 +9,15 @@ #include #include -/* page backup entry */ -typedef struct pbe { - unsigned long address; /* address of the copy */ - unsigned long orig_address; /* original address of page */ +/* struct pbe is used for creating lists of pages that should be restored + * atomically during the resume from disk, because the page frames they have + * occupied before the suspend are in use. + */ +struct pbe { + void *address; /* address of the copy */ + void *orig_address; /* original address of a page */ struct pbe *next; -} suspend_pagedir_t; - -#define for_each_pbe(pbe, pblist) \ - for (pbe = pblist ; pbe ; pbe = pbe->next) - -#define PBES_PER_PAGE (PAGE_SIZE/sizeof(struct pbe)) -#define PB_PAGE_SKIP (PBES_PER_PAGE-1) - -#define for_each_pb_page(pbe, pblist) \ - for (pbe = pblist ; pbe ; pbe = (pbe+PB_PAGE_SKIP)->next) - - -#define SWAP_FILENAME_MAXLENGTH 32 - - -extern dev_t swsusp_resume_device; - -/* mm/vmscan.c */ -extern int shrink_mem(void); +}; /* mm/page_alloc.c */ extern void drain_local_pages(void); @@ -53,18 +38,10 @@ static inline void pm_restore_console(void) {} static inline int software_suspend(void) { printk("Warning: fake suspend called\n"); - return -EPERM; + return -ENOSYS; } #endif /* CONFIG_PM */ -#ifdef CONFIG_SUSPEND_SMP -extern void disable_nonboot_cpus(void); -extern void enable_nonboot_cpus(void); -#else -static inline void disable_nonboot_cpus(void) {} -static inline void enable_nonboot_cpus(void) {} -#endif - void save_processor_state(void); void restore_processor_state(void); struct saved_context;