diff options
author | venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com> | 2008-12-19 16:47:29 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-12-19 18:40:30 -0500 |
commit | 34801ba9bf0381fcf0e2b08179d2c07f2c6ede74 (patch) | |
tree | e14d979cb9abf9220d0c60b04505851805975398 /include/asm-generic/pgtable.h | |
parent | 982d789ab76c8a11426852fec2fdf2f412e21c0c (diff) |
x86: PAT: move track untrack pfnmap stubs to asm-generic
Impact: Cleanup and branch hints only.
Move the track and untrack pfn stub routines from memory.c to asm-generic.
Also add unlikely to pfnmap related calls in fork and exit path.
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>
Diffstat (limited to 'include/asm-generic/pgtable.h')
-rw-r--r-- | include/asm-generic/pgtable.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index b84633801fb6..72ebe91005a8 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -293,6 +293,52 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm, | |||
293 | #define arch_flush_lazy_cpu_mode() do {} while (0) | 293 | #define arch_flush_lazy_cpu_mode() do {} while (0) |
294 | #endif | 294 | #endif |
295 | 295 | ||
296 | #ifndef __HAVE_PFNMAP_TRACKING | ||
297 | /* | ||
298 | * Interface that can be used by architecture code to keep track of | ||
299 | * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) | ||
300 | * | ||
301 | * track_pfn_vma_new is called when a _new_ pfn mapping is being established | ||
302 | * for physical range indicated by pfn and size. | ||
303 | */ | ||
304 | static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot, | ||
305 | unsigned long pfn, unsigned long size) | ||
306 | { | ||
307 | return 0; | ||
308 | } | ||
309 | |||
310 | /* | ||
311 | * Interface that can be used by architecture code to keep track of | ||
312 | * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) | ||
313 | * | ||
314 | * track_pfn_vma_copy is called when vma that is covering the pfnmap gets | ||
315 | * copied through copy_page_range(). | ||
316 | */ | ||
317 | static inline int track_pfn_vma_copy(struct vm_area_struct *vma) | ||
318 | { | ||
319 | return 0; | ||
320 | } | ||
321 | |||
322 | /* | ||
323 | * Interface that can be used by architecture code to keep track of | ||
324 | * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) | ||
325 | * | ||
326 | * untrack_pfn_vma is called while unmapping a pfnmap for a region. | ||
327 | * untrack can be called for a specific region indicated by pfn and size or | ||
328 | * can be for the entire vma (in which case size can be zero). | ||
329 | */ | ||
330 | static inline void untrack_pfn_vma(struct vm_area_struct *vma, | ||
331 | unsigned long pfn, unsigned long size) | ||
332 | { | ||
333 | } | ||
334 | #else | ||
335 | extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot, | ||
336 | unsigned long pfn, unsigned long size); | ||
337 | extern int track_pfn_vma_copy(struct vm_area_struct *vma); | ||
338 | extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, | ||
339 | unsigned long size); | ||
340 | #endif | ||
341 | |||
296 | #endif /* !__ASSEMBLY__ */ | 342 | #endif /* !__ASSEMBLY__ */ |
297 | 343 | ||
298 | #endif /* _ASM_GENERIC_PGTABLE_H */ | 344 | #endif /* _ASM_GENERIC_PGTABLE_H */ |