aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/pgtable.h
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2012-10-08 19:28:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:22:16 -0400
commitb3b9c2932c32e0692018ed5f12f3fd8c70eea8ce (patch)
treebca2431f0b0bd2d364f041f0344836cd39b1822c /include/asm-generic/pgtable.h
parent5180da410db6369d1f95c9014da1c9bc33fb043e (diff)
mm, x86, pat: rework linear pfn-mmap tracking
Replace the generic vma-flag VM_PFN_AT_MMAP with x86-only VM_PAT. We can toss mapping address from remap_pfn_range() into track_pfn_vma_new(), and collect all PAT-related logic together in arch/x86/. This patch also restores orignal frustration-free is_cow_mapping() check in remap_pfn_range(), as it was before commit v2.6.28-rc8-88-g3c8bb73 ("x86: PAT: store vm_pgoff for all linear_over_vma_region mappings - v3") is_linear_pfn_mapping() checks can be removed from mm/huge_memory.c, because it already handled by VM_PFNMAP in VM_NO_THP bit-mask. [suresh.b.siddha@intel.com: Reset the VM_PAT flag as part of untrack_pfn_vma()] Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Venkatesh Pallipadi <venki@google.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Nick Piggin <npiggin@kernel.dk> Cc: Ingo Molnar <mingo@redhat.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Carsten Otte <cotte@de.ibm.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Eric Paris <eparis@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: James Morris <james.l.morris@oracle.com> Cc: Jason Baron <jbaron@redhat.com> Cc: Kentaro Takeda <takedakn@nttdata.co.jp> Cc: Matt Helsley <matthltc@us.ibm.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robert Richter <robert.richter@amd.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Venkatesh Pallipadi <venki@google.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/pgtable.h')
-rw-r--r--include/asm-generic/pgtable.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index d4d4592c97fc..c9a612069c8e 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -391,7 +391,8 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm,
391 * by remap_pfn_range() for physical range indicated by pfn and size. 391 * by remap_pfn_range() for physical range indicated by pfn and size.
392 */ 392 */
393static inline int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot, 393static inline int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
394 unsigned long pfn, unsigned long size) 394 unsigned long pfn, unsigned long addr,
395 unsigned long size)
395{ 396{
396 return 0; 397 return 0;
397} 398}
@@ -426,7 +427,8 @@ static inline void untrack_pfn(struct vm_area_struct *vma,
426} 427}
427#else 428#else
428extern int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot, 429extern int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
429 unsigned long pfn, unsigned long size); 430 unsigned long pfn, unsigned long addr,
431 unsigned long size);
430extern int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, 432extern int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
431 unsigned long pfn); 433 unsigned long pfn);
432extern int track_pfn_copy(struct vm_area_struct *vma); 434extern int track_pfn_copy(struct vm_area_struct *vma);