aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/pgtable.h')
-rw-r--r--include/asm-generic/pgtable.h55
1 files changed, 32 insertions, 23 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index ff4947b7a976..d4d4592c97fc 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -381,48 +381,57 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm,
381 381
382#ifndef __HAVE_PFNMAP_TRACKING 382#ifndef __HAVE_PFNMAP_TRACKING
383/* 383/*
384 * Interface that can be used by architecture code to keep track of 384 * Interfaces that can be used by architecture code to keep track of
385 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) 385 * memory type of pfn mappings specified by the remap_pfn_range,
386 * 386 * vm_insert_pfn.
387 * track_pfn_vma_new is called when a _new_ pfn mapping is being established 387 */
388 * for physical range indicated by pfn and size. 388
389/*
390 * track_pfn_remap is called when a _new_ pfn mapping is being established
391 * by remap_pfn_range() for physical range indicated by pfn and size.
389 */ 392 */
390static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot, 393static inline int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
391 unsigned long pfn, unsigned long size) 394 unsigned long pfn, unsigned long size)
392{ 395{
393 return 0; 396 return 0;
394} 397}
395 398
396/* 399/*
397 * Interface that can be used by architecture code to keep track of 400 * track_pfn_insert is called when a _new_ single pfn is established
398 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn) 401 * by vm_insert_pfn().
399 * 402 */
400 * track_pfn_vma_copy is called when vma that is covering the pfnmap gets 403static inline int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
404 unsigned long pfn)
405{
406 return 0;
407}
408
409/*
410 * track_pfn_copy is called when vma that is covering the pfnmap gets
401 * copied through copy_page_range(). 411 * copied through copy_page_range().
402 */ 412 */
403static inline int track_pfn_vma_copy(struct vm_area_struct *vma) 413static inline int track_pfn_copy(struct vm_area_struct *vma)
404{ 414{
405 return 0; 415 return 0;
406} 416}
407 417
408/* 418/*
409 * Interface that can be used by architecture code to keep track of
410 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
411 *
412 * untrack_pfn_vma is called while unmapping a pfnmap for a region. 419 * untrack_pfn_vma is called while unmapping a pfnmap for a region.
413 * untrack can be called for a specific region indicated by pfn and size or 420 * untrack can be called for a specific region indicated by pfn and size or
414 * can be for the entire vma (in which case size can be zero). 421 * can be for the entire vma (in which case pfn, size are zero).
415 */ 422 */
416static inline void untrack_pfn_vma(struct vm_area_struct *vma, 423static inline void untrack_pfn(struct vm_area_struct *vma,
417 unsigned long pfn, unsigned long size) 424 unsigned long pfn, unsigned long size)
418{ 425{
419} 426}
420#else 427#else
421extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot, 428extern int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,
422 unsigned long pfn, unsigned long size); 429 unsigned long pfn, unsigned long size);
423extern int track_pfn_vma_copy(struct vm_area_struct *vma); 430extern int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot,
424extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, 431 unsigned long pfn);
425 unsigned long size); 432extern int track_pfn_copy(struct vm_area_struct *vma);
433extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,
434 unsigned long size);
426#endif 435#endif
427 436
428#ifdef CONFIG_MMU 437#ifdef CONFIG_MMU