aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 74949fbef8c6..f7e9efc6720b 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.