diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 87218ae84e36..6953a5a53e44 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -695,11 +695,12 @@ static inline int page_mapped(struct page *page) | |||
695 | #define VM_FAULT_SIGBUS 0x0002 | 695 | #define VM_FAULT_SIGBUS 0x0002 |
696 | #define VM_FAULT_MAJOR 0x0004 | 696 | #define VM_FAULT_MAJOR 0x0004 |
697 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 697 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
698 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */ | ||
698 | 699 | ||
699 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 700 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
700 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 701 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
701 | 702 | ||
702 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) | 703 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON) |
703 | 704 | ||
704 | /* | 705 | /* |
705 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | 706 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |
@@ -794,6 +795,11 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, | |||
794 | extern int vmtruncate(struct inode * inode, loff_t offset); | 795 | extern int vmtruncate(struct inode * inode, loff_t offset); |
795 | extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); | 796 | extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); |
796 | 797 | ||
798 | int truncate_inode_page(struct address_space *mapping, struct page *page); | ||
799 | int generic_error_remove_page(struct address_space *mapping, struct page *page); | ||
800 | |||
801 | int invalidate_inode_page(struct page *page); | ||
802 | |||
797 | #ifdef CONFIG_MMU | 803 | #ifdef CONFIG_MMU |
798 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 804 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
799 | unsigned long address, unsigned int flags); | 805 | unsigned long address, unsigned int flags); |
@@ -1308,5 +1314,12 @@ void vmemmap_populate_print_last(void); | |||
1308 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, | 1314 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, |
1309 | size_t size); | 1315 | size_t size); |
1310 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); | 1316 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); |
1317 | |||
1318 | extern void memory_failure(unsigned long pfn, int trapno); | ||
1319 | extern int __memory_failure(unsigned long pfn, int trapno, int ref); | ||
1320 | extern int sysctl_memory_failure_early_kill; | ||
1321 | extern int sysctl_memory_failure_recovery; | ||
1322 | extern atomic_long_t mce_bad_pages; | ||
1323 | |||
1311 | #endif /* __KERNEL__ */ | 1324 | #endif /* __KERNEL__ */ |
1312 | #endif /* _LINUX_MM_H */ | 1325 | #endif /* _LINUX_MM_H */ |