diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 87ecb40e11a0..35f811b0cd69 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -145,6 +145,14 @@ extern pgprot_t protection_map[16]; | |||
145 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ | 145 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ |
146 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ | 146 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ |
147 | 147 | ||
148 | /* | ||
149 | * This interface is used by x86 PAT code to identify a pfn mapping that is | ||
150 | * linear over entire vma. This is to optimize PAT code that deals with | ||
151 | * marking the physical region with a particular prot. This is not for generic | ||
152 | * mm use. Note also that this check will not work if the pfn mapping is | ||
153 | * linear for a vma starting at physical address 0. In which case PAT code | ||
154 | * falls back to slow path of reserving physical range page by page. | ||
155 | */ | ||
148 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) | 156 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) |
149 | { | 157 | { |
150 | return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff); | 158 | return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff); |