Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pgtable.h File Reference
#include <asm/page.h>
#include <asm/e820.h>
#include <asm/pgtable_types.h>
#include <asm/x86_init.h>
#include <asm/pgtable_64.h>
#include <linux/mm_types.h>
#include <asm-generic/pgtable.h>

Go to the source code of this file.

Macros

#define pgprot_noncached(prot)
 
#define ZERO_PAGE(vaddr)   (virt_to_page(empty_zero_page))
 
#define set_pte(ptep, pte)   native_set_pte(ptep, pte)
 
#define set_pte_at(mm, addr, ptep, pte)   native_set_pte_at(mm, addr, ptep, pte)
 
#define set_pmd_at(mm, addr, pmdp, pmd)   native_set_pmd_at(mm, addr, pmdp, pmd)
 
#define set_pte_atomic(ptep, pte)   native_set_pte_atomic(ptep, pte)
 
#define set_pmd(pmdp, pmd)   native_set_pmd(pmdp, pmd)
 
#define set_pgd(pgdp, pgd)   native_set_pgd(pgdp, pgd)
 
#define pgd_clear(pgd)   native_pgd_clear(pgd)
 
#define set_pud(pudp, pud)   native_set_pud(pudp, pud)
 
#define pud_clear(pud)   native_pud_clear(pud)
 
#define pte_clear(mm, addr, ptep)   native_pte_clear(mm, addr, ptep)
 
#define pmd_clear(pmd)   native_pmd_clear(pmd)
 
#define pte_update(mm, addr, ptep)   do { } while (0)
 
#define pte_update_defer(mm, addr, ptep)   do { } while (0)
 
#define pmd_update(mm, addr, ptep)   do { } while (0)
 
#define pmd_update_defer(mm, addr, ptep)   do { } while (0)
 
#define pgd_val(x)   native_pgd_val(x)
 
#define __pgd(x)   native_make_pgd(x)
 
#define pud_val(x)   native_pud_val(x)
 
#define __pud(x)   native_make_pud(x)
 
#define pmd_val(x)   native_pmd_val(x)
 
#define __pmd(x)   native_make_pmd(x)
 
#define pte_val(x)   native_pte_val(x)
 
#define __pte(x)   native_make_pte(x)
 
#define arch_end_context_switch(prev)   do {} while(0)
 
#define pte_page(pte)   pfn_to_page(pte_pfn(pte))
 
#define pgprot_modify   pgprot_modify
 
#define pte_pgprot(x)   __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
 
#define canon_pgprot(p)   __pgprot(massage_pgprot(p))
 
#define __HAVE_ARCH_PTE_SAME
 
#define pmd_page(pmd)   pfn_to_page((pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT)
 
#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
 
#define io_remap_pfn_range(vma, vaddr, pfn, size, prot)   remap_pfn_range(vma, vaddr, pfn, size, prot)
 
#define pgd_index(address)   (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
 
#define pgd_offset(mm, address)   ((mm)->pgd + pgd_index((address)))
 
#define pgd_offset_k(address)   pgd_offset(&init_mm, (address))
 
#define KERNEL_PGD_BOUNDARY   pgd_index(PAGE_OFFSET)
 
#define KERNEL_PGD_PTRS   (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)
 
#define pte_update(mm, addr, ptep)   do { } while (0)
 
#define pte_update_defer(mm, addr, ptep)   do { } while (0)
 
#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
 
#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
 
#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
 
#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
 
#define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
 
#define __HAVE_ARCH_PTEP_SET_WRPROTECT
 
#define flush_tlb_fix_spurious_fault(vma, address)   do { } while (0)
 
#define mk_pmd(page, pgprot)   pfn_pmd(page_to_pfn(page), (pgprot))
 
#define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
 
#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
 
#define __HAVE_ARCH_PMDP_CLEAR_YOUNG_FLUSH
 
#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
 
#define __HAVE_ARCH_PMD_WRITE
 
#define __HAVE_ARCH_PMDP_GET_AND_CLEAR
 
#define __HAVE_ARCH_PMDP_SET_WRPROTECT
 

Functions

struct mm_structpgd_page_get_mm (struct page *page)
 
pmd_tpopulate_extra_pmd (unsigned long vaddr)
 
pte_tpopulate_extra_pte (unsigned long vaddr)
 
int ptep_set_access_flags (struct vm_area_struct *vma, unsigned long address, pte_t *ptep, pte_t entry, int dirty)
 
int ptep_test_and_clear_young (struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
 
int ptep_clear_flush_young (struct vm_area_struct *vma, unsigned long address, pte_t *ptep)
 
int pmdp_set_access_flags (struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp, pmd_t entry, int dirty)
 
int pmdp_test_and_clear_young (struct vm_area_struct *vma, unsigned long addr, pmd_t *pmdp)
 
int pmdp_clear_flush_young (struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp)
 
void pmdp_splitting_flush (struct vm_area_struct *vma, unsigned long addr, pmd_t *pmdp)
 

Variables

unsigned long empty_zero_page [PAGE_SIZE/sizeof(unsigned long)]
 
spinlock_t pgd_lock
 
struct list_head pgd_list
 
int direct_gbpages
 

Macro Definition Documentation

#define __HAVE_ARCH_PMD_WRITE

Definition at line 733 of file pgtable.h.

#define __HAVE_ARCH_PMDP_CLEAR_YOUNG_FLUSH

Definition at line 724 of file pgtable.h.

#define __HAVE_ARCH_PMDP_GET_AND_CLEAR

Definition at line 739 of file pgtable.h.

#define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS

Definition at line 715 of file pgtable.h.

#define __HAVE_ARCH_PMDP_SET_WRPROTECT

Definition at line 748 of file pgtable.h.

#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH

Definition at line 729 of file pgtable.h.

#define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG

Definition at line 720 of file pgtable.h.

#define __HAVE_ARCH_PTE_SAME

Definition at line 399 of file pgtable.h.

#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH

Definition at line 672 of file pgtable.h.

#define __HAVE_ARCH_PTEP_GET_AND_CLEAR

Definition at line 676 of file pgtable.h.

#define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL

Definition at line 685 of file pgtable.h.

#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS

Definition at line 663 of file pgtable.h.

#define __HAVE_ARCH_PTEP_SET_WRPROTECT

Definition at line 703 of file pgtable.h.

#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG

Definition at line 668 of file pgtable.h.

#define __pgd (   x)    native_make_pgd(x)

Definition at line 67 of file pgtable.h.

#define __pmd (   x)    native_make_pmd(x)

Definition at line 76 of file pgtable.h.

#define __pte (   x)    native_make_pte(x)

Definition at line 80 of file pgtable.h.

#define __pud (   x)    native_make_pud(x)

Definition at line 71 of file pgtable.h.

#define arch_end_context_switch (   prev)    do {} while(0)

Definition at line 82 of file pgtable.h.

#define canon_pgprot (   p)    __pgprot(massage_pgprot(p))

Definition at line 353 of file pgtable.h.

#define flush_tlb_fix_spurious_fault (   vma,
  address 
)    do { } while (0)

Definition at line 711 of file pgtable.h.

#define io_remap_pfn_range (   vma,
  vaddr,
  pfn,
  size,
  prot 
)    remap_pfn_range(vma, vaddr, pfn, size, prot)

Definition at line 490 of file pgtable.h.

#define KERNEL_PGD_BOUNDARY   pgd_index(PAGE_OFFSET)

Definition at line 599 of file pgtable.h.

#define KERNEL_PGD_PTRS   (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)

Definition at line 600 of file pgtable.h.

#define mk_pmd (   page,
  pgprot 
)    pfn_pmd(page_to_pfn(page), (pgprot))

Definition at line 713 of file pgtable.h.

#define mk_pte (   page,
  pgprot 
)    pfn_pte(page_to_pfn(page), (pgprot))

Definition at line 462 of file pgtable.h.

#define pgd_clear (   pgd)    native_pgd_clear(pgd)

Definition at line 47 of file pgtable.h.

#define pgd_index (   address)    (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))

Definition at line 585 of file pgtable.h.

#define pgd_offset (   mm,
  address 
)    ((mm)->pgd + pgd_index((address)))

Definition at line 591 of file pgtable.h.

#define pgd_offset_k (   address)    pgd_offset(&init_mm, (address))

Definition at line 596 of file pgtable.h.

#define pgd_val (   x)    native_pgd_val(x)

Definition at line 66 of file pgtable.h.

#define pgprot_modify   pgprot_modify

Definition at line 343 of file pgtable.h.

#define pgprot_noncached (   prot)
Value:
((boot_cpu_data.x86 > 3) \
: (prot))

Definition at line 12 of file pgtable.h.

#define pmd_clear (   pmd)    native_pmd_clear(pmd)

Definition at line 59 of file pgtable.h.

#define pmd_page (   pmd)    pfn_to_page((pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT)

Definition at line 442 of file pgtable.h.

#define pmd_update (   mm,
  addr,
  ptep 
)    do { } while (0)

Definition at line 63 of file pgtable.h.

#define pmd_update_defer (   mm,
  addr,
  ptep 
)    do { } while (0)

Definition at line 64 of file pgtable.h.

#define pmd_val (   x)    native_pmd_val(x)

Definition at line 75 of file pgtable.h.

#define pte_clear (   mm,
  addr,
  ptep 
)    native_pte_clear(mm, addr, ptep)

Definition at line 58 of file pgtable.h.

#define pte_page (   pte)    pfn_to_page(pte_pfn(pte))

Definition at line 145 of file pgtable.h.

#define pte_pgprot (   x)    __pgprot(pte_flags(x) & PTE_FLAGS_MASK)

Definition at line 351 of file pgtable.h.

#define pte_update (   mm,
  addr,
  ptep 
)    do { } while (0)

Definition at line 650 of file pgtable.h.

#define pte_update (   mm,
  addr,
  ptep 
)    do { } while (0)

Definition at line 650 of file pgtable.h.

#define pte_update_defer (   mm,
  addr,
  ptep 
)    do { } while (0)

Definition at line 651 of file pgtable.h.

#define pte_update_defer (   mm,
  addr,
  ptep 
)    do { } while (0)

Definition at line 651 of file pgtable.h.

#define pte_val (   x)    native_pte_val(x)

Definition at line 79 of file pgtable.h.

#define pud_clear (   pud)    native_pud_clear(pud)

Definition at line 55 of file pgtable.h.

#define pud_val (   x)    native_pud_val(x)

Definition at line 70 of file pgtable.h.

#define set_pgd (   pgdp,
  pgd 
)    native_set_pgd(pgdp, pgd)

Definition at line 46 of file pgtable.h.

#define set_pmd (   pmdp,
  pmd 
)    native_set_pmd(pmdp, pmd)

Definition at line 43 of file pgtable.h.

#define set_pmd_at (   mm,
  addr,
  pmdp,
  pmd 
)    native_set_pmd_at(mm, addr, pmdp, pmd)

Definition at line 38 of file pgtable.h.

#define set_pte (   ptep,
  pte 
)    native_set_pte(ptep, pte)

Definition at line 36 of file pgtable.h.

#define set_pte_at (   mm,
  addr,
  ptep,
  pte 
)    native_set_pte_at(mm, addr, ptep, pte)

Definition at line 37 of file pgtable.h.

#define set_pte_atomic (   ptep,
  pte 
)    native_set_pte_atomic(ptep, pte)

Definition at line 40 of file pgtable.h.

#define set_pud (   pudp,
  pud 
)    native_set_pud(pudp, pud)

Definition at line 51 of file pgtable.h.

#define ZERO_PAGE (   vaddr)    (virt_to_page(empty_zero_page))

Definition at line 26 of file pgtable.h.

Function Documentation

struct mm_struct* pgd_page_get_mm ( struct page page)
read

Definition at line 97 of file pgtable.c.

int pmdp_clear_flush_young ( struct vm_area_struct vma,
unsigned long  address,
pmd_t pmdp 
)

Definition at line 69 of file pgtable-generic.c.

int pmdp_set_access_flags ( struct vm_area_struct vma,
unsigned long  address,
pmd_t pmdp,
pmd_t  entry,
int  dirty 
)

Definition at line 37 of file pgtable-generic.c.

void pmdp_splitting_flush ( struct vm_area_struct vma,
unsigned long  addr,
pmd_t pmdp 
)
int pmdp_test_and_clear_young ( struct vm_area_struct vma,
unsigned long  addr,
pmd_t pmdp 
)
pmd_t* populate_extra_pmd ( unsigned long  vaddr)

Definition at line 132 of file init_32.c.

pte_t* populate_extra_pte ( unsigned long  vaddr)

Definition at line 140 of file init_32.c.

int ptep_clear_flush_young ( struct vm_area_struct vma,
unsigned long  address,
pte_t ptep 
)

Definition at line 370 of file pgtable.c.

int ptep_set_access_flags ( struct vm_area_struct vma,
unsigned long  address,
pte_t ptep,
pte_t  entry,
int  dirty 
)

Definition at line 209 of file pgtable.c.

int ptep_test_and_clear_young ( struct vm_area_struct vma,
unsigned long  addr,
pte_t ptep 
)

Definition at line 346 of file pgtable.c.

Variable Documentation

int direct_gbpages

Definition at line 30 of file init.c.

unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]

Definition at line 42 of file mmu.c.

struct list_head pgd_list

Definition at line 83 of file pgalloc.c.

spinlock_t pgd_lock