OMAPDSS: VENC: fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4
[zen-stable.git] / include / linux / migrate.h
blob05ed2828a5535bfe151c17ab2b5a656a5209ef4c
1 #ifndef _LINUX_MIGRATE_H
2 #define _LINUX_MIGRATE_H
4 #include <linux/mm.h>
5 #include <linux/mempolicy.h>
6 #include <linux/migrate_mode.h>
8 typedef struct page *new_page_t(struct page *, unsigned long private, int **);
10 #ifdef CONFIG_MIGRATION
11 #define PAGE_MIGRATION 1
13 extern void putback_lru_pages(struct list_head *l);
14 extern int migrate_page(struct address_space *,
15 struct page *, struct page *, enum migrate_mode);
16 extern int migrate_pages(struct list_head *l, new_page_t x,
17 unsigned long private, bool offlining,
18 enum migrate_mode mode);
19 extern int migrate_huge_pages(struct list_head *l, new_page_t x,
20 unsigned long private, bool offlining,
21 enum migrate_mode mode);
23 extern int fail_migrate_page(struct address_space *,
24 struct page *, struct page *);
26 extern int migrate_prep(void);
27 extern int migrate_prep_local(void);
28 extern int migrate_vmas(struct mm_struct *mm,
29 const nodemask_t *from, const nodemask_t *to,
30 unsigned long flags);
31 extern void migrate_page_copy(struct page *newpage, struct page *page);
32 extern int migrate_huge_page_move_mapping(struct address_space *mapping,
33 struct page *newpage, struct page *page);
34 #else
35 #define PAGE_MIGRATION 0
37 static inline void putback_lru_pages(struct list_head *l) {}
38 static inline int migrate_pages(struct list_head *l, new_page_t x,
39 unsigned long private, bool offlining,
40 enum migrate_mode mode) { return -ENOSYS; }
41 static inline int migrate_huge_pages(struct list_head *l, new_page_t x,
42 unsigned long private, bool offlining,
43 enum migrate_mode mode) { return -ENOSYS; }
45 static inline int migrate_prep(void) { return -ENOSYS; }
46 static inline int migrate_prep_local(void) { return -ENOSYS; }
48 static inline int migrate_vmas(struct mm_struct *mm,
49 const nodemask_t *from, const nodemask_t *to,
50 unsigned long flags)
52 return -ENOSYS;
55 static inline void migrate_page_copy(struct page *newpage,
56 struct page *page) {}
58 static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
59 struct page *newpage, struct page *page)
61 return -ENOSYS;
64 /* Possible settings for the migrate_page() method in address_operations */
65 #define migrate_page NULL
66 #define fail_migrate_page NULL
68 #endif /* CONFIG_MIGRATION */
69 #endif /* _LINUX_MIGRATE_H */