diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/hugetlb.h | 17 | ||||
| -rw-r--r-- | include/linux/migrate.h | 16 | ||||
| -rw-r--r-- | include/linux/mm.h | 12 | ||||
| -rw-r--r-- | include/linux/signalfd.h | 3 |
4 files changed, 43 insertions, 5 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f479700df61b..943c76b3d4bb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -43,7 +43,8 @@ int hugetlb_reserve_pages(struct inode *inode, long from, long to, | |||
| 43 | struct vm_area_struct *vma, | 43 | struct vm_area_struct *vma, |
| 44 | int acctflags); | 44 | int acctflags); |
| 45 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 45 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
| 46 | void __isolate_hwpoisoned_huge_page(struct page *page); | 46 | int dequeue_hwpoisoned_huge_page(struct page *page); |
| 47 | void copy_huge_page(struct page *dst, struct page *src); | ||
| 47 | 48 | ||
| 48 | extern unsigned long hugepages_treat_as_movable; | 49 | extern unsigned long hugepages_treat_as_movable; |
| 49 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 50 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
| @@ -101,7 +102,10 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
| 101 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 102 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
| 102 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) | 103 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
| 103 | #define huge_pte_offset(mm, address) 0 | 104 | #define huge_pte_offset(mm, address) 0 |
| 104 | #define __isolate_hwpoisoned_huge_page(page) 0 | 105 | #define dequeue_hwpoisoned_huge_page(page) 0 |
| 106 | static inline void copy_huge_page(struct page *dst, struct page *src) | ||
| 107 | { | ||
| 108 | } | ||
| 105 | 109 | ||
| 106 | #define hugetlb_change_protection(vma, address, end, newprot) | 110 | #define hugetlb_change_protection(vma, address, end, newprot) |
| 107 | 111 | ||
| @@ -228,6 +232,8 @@ struct huge_bootmem_page { | |||
| 228 | struct hstate *hstate; | 232 | struct hstate *hstate; |
| 229 | }; | 233 | }; |
| 230 | 234 | ||
| 235 | struct page *alloc_huge_page_node(struct hstate *h, int nid); | ||
| 236 | |||
| 231 | /* arch callback */ | 237 | /* arch callback */ |
| 232 | int __init alloc_bootmem_huge_page(struct hstate *h); | 238 | int __init alloc_bootmem_huge_page(struct hstate *h); |
| 233 | 239 | ||
| @@ -301,8 +307,14 @@ static inline struct hstate *page_hstate(struct page *page) | |||
| 301 | return size_to_hstate(PAGE_SIZE << compound_order(page)); | 307 | return size_to_hstate(PAGE_SIZE << compound_order(page)); |
| 302 | } | 308 | } |
| 303 | 309 | ||
| 310 | static inline unsigned hstate_index_to_shift(unsigned index) | ||
| 311 | { | ||
| 312 | return hstates[index].order + PAGE_SHIFT; | ||
| 313 | } | ||
| 314 | |||
| 304 | #else | 315 | #else |
| 305 | struct hstate {}; | 316 | struct hstate {}; |
| 317 | #define alloc_huge_page_node(h, nid) NULL | ||
| 306 | #define alloc_bootmem_huge_page(h) NULL | 318 | #define alloc_bootmem_huge_page(h) NULL |
| 307 | #define hstate_file(f) NULL | 319 | #define hstate_file(f) NULL |
| 308 | #define hstate_vma(v) NULL | 320 | #define hstate_vma(v) NULL |
| @@ -317,6 +329,7 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) | |||
| 317 | { | 329 | { |
| 318 | return 1; | 330 | return 1; |
| 319 | } | 331 | } |
| 332 | #define hstate_index_to_shift(index) 0 | ||
| 320 | #endif | 333 | #endif |
| 321 | 334 | ||
| 322 | #endif /* _LINUX_HUGETLB_H */ | 335 | #endif /* _LINUX_HUGETLB_H */ |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 7238231b8dd4..085527fb8261 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
| @@ -14,6 +14,8 @@ extern int migrate_page(struct address_space *, | |||
| 14 | struct page *, struct page *); | 14 | struct page *, struct page *); |
| 15 | extern int migrate_pages(struct list_head *l, new_page_t x, | 15 | extern int migrate_pages(struct list_head *l, new_page_t x, |
| 16 | unsigned long private, int offlining); | 16 | unsigned long private, int offlining); |
| 17 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, | ||
| 18 | unsigned long private, int offlining); | ||
| 17 | 19 | ||
| 18 | extern int fail_migrate_page(struct address_space *, | 20 | extern int fail_migrate_page(struct address_space *, |
| 19 | struct page *, struct page *); | 21 | struct page *, struct page *); |
| @@ -23,12 +25,17 @@ extern int migrate_prep_local(void); | |||
| 23 | extern int migrate_vmas(struct mm_struct *mm, | 25 | extern int migrate_vmas(struct mm_struct *mm, |
| 24 | const nodemask_t *from, const nodemask_t *to, | 26 | const nodemask_t *from, const nodemask_t *to, |
| 25 | unsigned long flags); | 27 | unsigned long flags); |
| 28 | extern void migrate_page_copy(struct page *newpage, struct page *page); | ||
| 29 | extern int migrate_huge_page_move_mapping(struct address_space *mapping, | ||
| 30 | struct page *newpage, struct page *page); | ||
| 26 | #else | 31 | #else |
| 27 | #define PAGE_MIGRATION 0 | 32 | #define PAGE_MIGRATION 0 |
| 28 | 33 | ||
| 29 | static inline void putback_lru_pages(struct list_head *l) {} | 34 | static inline void putback_lru_pages(struct list_head *l) {} |
| 30 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 35 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
| 31 | unsigned long private, int offlining) { return -ENOSYS; } | 36 | unsigned long private, int offlining) { return -ENOSYS; } |
| 37 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, | ||
| 38 | unsigned long private, int offlining) { return -ENOSYS; } | ||
| 32 | 39 | ||
| 33 | static inline int migrate_prep(void) { return -ENOSYS; } | 40 | static inline int migrate_prep(void) { return -ENOSYS; } |
| 34 | static inline int migrate_prep_local(void) { return -ENOSYS; } | 41 | static inline int migrate_prep_local(void) { return -ENOSYS; } |
| @@ -40,6 +47,15 @@ static inline int migrate_vmas(struct mm_struct *mm, | |||
| 40 | return -ENOSYS; | 47 | return -ENOSYS; |
| 41 | } | 48 | } |
| 42 | 49 | ||
| 50 | static inline void migrate_page_copy(struct page *newpage, | ||
| 51 | struct page *page) {} | ||
| 52 | |||
| 53 | static inline int migrate_huge_page_move_mapping(struct address_space *mapping, | ||
| 54 | struct page *newpage, struct page *page) | ||
| 55 | { | ||
| 56 | return -ENOSYS; | ||
| 57 | } | ||
| 58 | |||
| 43 | /* Possible settings for the migrate_page() method in address_operations */ | 59 | /* Possible settings for the migrate_page() method in address_operations */ |
| 44 | #define migrate_page NULL | 60 | #define migrate_page NULL |
| 45 | #define fail_migrate_page NULL | 61 | #define fail_migrate_page NULL |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7687228dd3b7..a4c66846fb8f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -718,12 +718,20 @@ static inline int page_mapped(struct page *page) | |||
| 718 | #define VM_FAULT_SIGBUS 0x0002 | 718 | #define VM_FAULT_SIGBUS 0x0002 |
| 719 | #define VM_FAULT_MAJOR 0x0004 | 719 | #define VM_FAULT_MAJOR 0x0004 |
| 720 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 720 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
| 721 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */ | 721 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ |
| 722 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ | ||
| 722 | 723 | ||
| 723 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 724 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
| 724 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 725 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
| 725 | 726 | ||
| 726 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON) | 727 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ |
| 728 | |||
| 729 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ | ||
| 730 | VM_FAULT_HWPOISON_LARGE) | ||
| 731 | |||
| 732 | /* Encode hstate index for a hwpoisoned large page */ | ||
| 733 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) | ||
| 734 | #define VM_FAULT_GET_HINDEX(x) (((x) >> 12) & 0xf) | ||
| 727 | 735 | ||
| 728 | /* | 736 | /* |
| 729 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | 737 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index b363b916c909..3ff4961da9b5 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
| @@ -33,6 +33,7 @@ struct signalfd_siginfo { | |||
| 33 | __u64 ssi_utime; | 33 | __u64 ssi_utime; |
| 34 | __u64 ssi_stime; | 34 | __u64 ssi_stime; |
| 35 | __u64 ssi_addr; | 35 | __u64 ssi_addr; |
| 36 | __u16 ssi_addr_lsb; | ||
| 36 | 37 | ||
| 37 | /* | 38 | /* |
| 38 | * Pad strcture to 128 bytes. Remember to update the | 39 | * Pad strcture to 128 bytes. Remember to update the |
| @@ -43,7 +44,7 @@ struct signalfd_siginfo { | |||
| 43 | * comes out of a read(2) and we really don't want to have | 44 | * comes out of a read(2) and we really don't want to have |
| 44 | * a compat on read(2). | 45 | * a compat on read(2). |
| 45 | */ | 46 | */ |
| 46 | __u8 __pad[48]; | 47 | __u8 __pad[46]; |
| 47 | }; | 48 | }; |
| 48 | 49 | ||
| 49 | 50 | ||
