diff options
author | Andi Kleen <ak@linux.intel.com> | 2010-10-22 17:40:48 +0200 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-10-22 17:40:48 +0200 |
commit | 46e387bbd82d438b9131e237e6e2cb55a825da49 (patch) | |
tree | 414948afd6b4d63c6ea8cc79ce022128bc1bf2eb /include/linux/mm.h | |
parent | e9d08567ef72a2d0fb9b14dded386352d3136442 (diff) | |
parent | 3ef8fd7f720fc4f462fcdcae2fcde6f1c0536bfe (diff) |
Merge branch 'hwpoison-hugepages' into hwpoison
Conflicts:
mm/memory-failure.c
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 12 |
1 files changed, 10 insertions, 2 deletions
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) #define VM_FAULT_SIGBUS 0x0002 #define VM_FAULT_MAJOR 0x0004 #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ -#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */ +#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ +#define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ -#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON) +#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ + +#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ + VM_FAULT_HWPOISON_LARGE) + +/* Encode hstate index for a hwpoisoned large page */ +#define VM_FAULT_SET_HINDEX(x) ((x) << 12) +#define VM_FAULT_GET_HINDEX(x) (((x) >> 12) & 0xf) /* * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |