source: svn/trunk/newcon3bcm2_21bu/toolchain/mipsel-linux-uclibc/include/linux/suspend.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#ifndef _LINUX_SWSUSP_H
2#define _LINUX_SWSUSP_H
3
4#if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32)
5#include <asm/suspend.h>
6#endif
7#include <linux/swap.h>
8#include <linux/notifier.h>
9#include <linux/init.h>
10#include <linux/pm.h>
11
12/* page backup entry */
13typedef struct pbe {
14        unsigned long address;          /* address of the copy */
15        unsigned long orig_address;     /* original address of page */
16        swp_entry_t swap_address;       
17
18        struct pbe *next;       /* also used as scratch space at
19                                 * end of page (see link, diskpage)
20                                 */
21} suspend_pagedir_t;
22
23#define for_each_pbe(pbe, pblist) \
24        for (pbe = pblist ; pbe ; pbe = pbe->next)
25
26#define PBES_PER_PAGE      (PAGE_SIZE/sizeof(struct pbe))
27#define PB_PAGE_SKIP       (PBES_PER_PAGE-1)
28
29#define for_each_pb_page(pbe, pblist) \
30        for (pbe = pblist ; pbe ; pbe = (pbe+PB_PAGE_SKIP)->next)
31
32
33#define SWAP_FILENAME_MAXLENGTH 32
34
35
36extern dev_t swsusp_resume_device;
37   
38/* mm/vmscan.c */
39extern int shrink_mem(void);
40
41/* mm/page_alloc.c */
42extern void drain_local_pages(void);
43extern void mark_free_pages(struct zone *zone);
44
45#ifdef CONFIG_PM
46/* kernel/power/swsusp.c */
47extern int software_suspend(void);
48
49extern int pm_prepare_console(void);
50extern void pm_restore_console(void);
51
52#else
53static inline int software_suspend(void)
54{
55        printk("Warning: fake suspend called\n");
56        return -EPERM;
57}
58#endif
59
60#ifdef CONFIG_SMP
61extern void disable_nonboot_cpus(void);
62extern void enable_nonboot_cpus(void);
63#else
64static inline void disable_nonboot_cpus(void) {}
65static inline void enable_nonboot_cpus(void) {}
66#endif
67
68void save_processor_state(void);
69void restore_processor_state(void);
70struct saved_context;
71void __save_processor_state(struct saved_context *ctxt);
72void __restore_processor_state(struct saved_context *ctxt);
73
74#endif /* _LINUX_SWSUSP_H */
Note: See TracBrowser for help on using the repository browser.