diff options
author | Andi Kleen <andi@firstfloor.org> | 2009-09-16 05:50:06 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2009-09-16 05:50:06 -0400 |
commit | d1737fdbec7f90edc52dd0c5c3767457f28e78d8 (patch) | |
tree | 8699aabdff713a70665a9f60106ce21012376733 /include/linux/mm.h | |
parent | ad5fa913991e9e0f122b021e882b0d50051fbdbc (diff) |
HWPOISON: Add basic support for poisoned pages in fault handler v3
- Add a new VM_FAULT_HWPOISON error code to handle_mm_fault. Right now
architectures have to explicitely enable poison page support, so
this is forward compatible to all architectures. They only need
to add it when they enable poison page support.
- Add poison page handling in swap in fault code
v2: Add missing delayacct_clear_flag (Hidehiro Kawai)
v3: Really use delayacct_clear_flag (Hidehiro Kawai)
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 9a72cc78e6b8..082b68cb5ffe 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -685,11 +685,12 @@ static inline int page_mapped(struct page *page) | |||
685 | #define VM_FAULT_SIGBUS 0x0002 | 685 | #define VM_FAULT_SIGBUS 0x0002 |
686 | #define VM_FAULT_MAJOR 0x0004 | 686 | #define VM_FAULT_MAJOR 0x0004 |
687 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 687 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
688 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */ | ||
688 | 689 | ||
689 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 690 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
690 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 691 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
691 | 692 | ||
692 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) | 693 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON) |
693 | 694 | ||
694 | /* | 695 | /* |
695 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | 696 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |