Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pgtable.c File Reference
#include <linux/mm.h>
#include <linux/gfp.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/tlb.h>
#include <asm/fixmap.h>

Go to the source code of this file.

Macros

#define PGALLOC_GFP   GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO
 
#define PGALLOC_USER_GFP   0
 
#define UNSHARED_PTRS_PER_PGD   (SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)
 
#define PREALLOCATED_PMDS   0
 

Functions

pte_tpte_alloc_one_kernel (struct mm_struct *mm, unsigned long address)
 
pgtable_t pte_alloc_one (struct mm_struct *mm, unsigned long address)
 
 early_param ("userpte", setup_userpte)
 
void ___pte_free_tlb (struct mmu_gather *tlb, struct page *pte)
 
struct mm_structpgd_page_get_mm (struct page *page)
 
pgd_tpgd_alloc (struct mm_struct *mm)
 
void pgd_free (struct mm_struct *mm, pgd_t *pgd)
 
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)
 
void __init reserve_top_address (unsigned long reserve)
 
void __native_set_fixmap (enum fixed_addresses idx, pte_t pte)
 
void native_set_fixmap (enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags)
 

Variables

gfp_t __userpte_alloc_gfp = PGALLOC_GFP | PGALLOC_USER_GFP
 
int fixmaps_set
 

Macro Definition Documentation

#define PGALLOC_GFP   GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO

Definition at line 8 of file pgtable.c.

#define PGALLOC_USER_GFP   0

Definition at line 13 of file pgtable.c.

#define PREALLOCATED_PMDS   0

Definition at line 176 of file pgtable.c.

#define UNSHARED_PTRS_PER_PGD   (SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)

Definition at line 87 of file pgtable.c.

Function Documentation

void ___pte_free_tlb ( struct mmu_gather tlb,
struct page pte 
)

Definition at line 50 of file pgtable.c.

void __native_set_fixmap ( enum fixed_addresses  idx,
pte_t  pte 
)

Definition at line 431 of file pgtable.c.

early_param ( "userpte"  ,
setup_userpte   
)
void native_set_fixmap ( enum fixed_addresses  idx,
phys_addr_t  phys,
pgprot_t  flags 
)

Definition at line 443 of file pgtable.c.

pgd_t* pgd_alloc ( struct mm_struct mm)

Definition at line 256 of file pgtable.c.

void pgd_free ( struct mm_struct mm,
pgd_t pgd 
)

Definition at line 296 of file pgtable.c.

struct mm_struct* pgd_page_get_mm ( struct page page)
read

Definition at line 97 of file pgtable.c.

pgtable_t pte_alloc_one ( struct mm_struct mm,
unsigned long  address 
)
read

Definition at line 23 of file pgtable.c.

pte_t* pte_alloc_one_kernel ( struct mm_struct mm,
unsigned long  address 
)
inline

OK, this one's a bit tricky... ioremap can get called before memory is initialized (early serial console does this) and will want to alloc a page for its mapping. No userspace pages will ever get allocated before memory is initialized so this applies only to kernel pages. In the event that this is called before memory is initialized we allocate the page using the memblock infrastructure.

Definition at line 18 of file pgtable.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 304 of file pgtable.c.

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

Definition at line 338 of file pgtable.c.

void __init reserve_top_address ( unsigned long  reserve)

reserve_top_address - reserves a hole in the top of kernel address space - size of hole to reserve

Can be used to relocate the fixmap area and poke a hole in the top of kernel address space to make room for a hypervisor.

Definition at line 419 of file pgtable.c.

Variable Documentation

gfp_t __userpte_alloc_gfp = PGALLOC_GFP | PGALLOC_USER_GFP

Definition at line 16 of file pgtable.c.

int fixmaps_set

Definition at line 429 of file pgtable.c.