x86: PAT: hooks in generic vm code to help archs to track pfnmap regions - v3

Impact: Introduces new hooks, which are currently null.

Introduce generic hooks in remap_pfn_range and vm_insert_pfn and
corresponding copy and free routines with reserve and free tracking.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
venkatesh.pallipadi@intel.com 2008-12-18 11:41:29 -08:00 committed by H. Peter Anvin
parent e121e41844
commit 2ab640379a
2 changed files with 81 additions and 1 deletions

View file

@ -155,6 +155,12 @@ static inline int is_pfn_mapping(struct vm_area_struct *vma)
return (vma->vm_flags & VM_PFNMAP);
}
extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
unsigned long pfn, unsigned long size);
extern int track_pfn_vma_copy(struct vm_area_struct *vma);
extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
unsigned long size);
/*
* vm_fault is filled by the the pagefault handler and passed to the vma's
* ->fault function. The vma's ->fault is responsible for returning a bitmask