提交 6bd9cd50 编写于 作者: V venkatesh.pallipadi@intel.com 提交者: H. Peter Anvin

x86: PAT: clarify is_linear_pfn_mapping() interface

Impact: Documentation only

Incremental patches to address the review comments from Nick Piggin
for v3 version of x86 PAT pfnmap changes patchset here

http://lkml.indiana.edu/hypermail/linux/kernel/0812.2/01330.html

This patch:

Clarify is_linear_pfn_mapping() and its usage.

It is used by x86 PAT code for performance reasons. Identifying pfnmap
as linear over entire vma helps speedup reserve and free of memtype
for the region.
Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
上级 a2ced6e1
......@@ -145,6 +145,14 @@ extern pgprot_t protection_map[16];
#define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */
#define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */
/*
* This interface is used by x86 PAT code to identify a pfn mapping that is
* linear over entire vma. This is to optimize PAT code that deals with
* marking the physical region with a particular prot. This is not for generic
* mm use. Note also that this check will not work if the pfn mapping is
* linear for a vma starting at physical address 0. In which case PAT code
* falls back to slow path of reserving physical range page by page.
*/
static inline int is_linear_pfn_mapping(struct vm_area_struct *vma)
{
return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册