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

Go to the source code of this file.

Macros

#define pmd_populate_kernel(mm, pmd, pte)   set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) __pa(pte)))
 
#define pmd_populate(mm, pmd, pte)
 
#define pmd_pgtable(pmd)   pmd_page(pmd)
 
#define __pte_free_tlb(tlb, pte, address)
 
#define check_pgt_cache()   do { } while (0)
 

Functions

pgd_tpgd_alloc (struct mm_struct *)
 
void pgd_free (struct mm_struct *mm, pgd_t *pgd)
 
pte_tpte_alloc_one_kernel (struct mm_struct *, unsigned long)
 
pgtable_t pte_alloc_one (struct mm_struct *, unsigned long)
 

Macro Definition Documentation

#define __pte_free_tlb (   tlb,
  pte,
  address 
)
Value:
do { \
pgtable_page_dtor(pte); \
tlb_remove_page((tlb),(pte)); \
} while (0)

Definition at line 42 of file pgalloc.h.

#define check_pgt_cache (   void)    do { } while (0)

Definition at line 58 of file pgalloc.h.

#define pmd_pgtable (   pmd)    pmd_page(pmd)

Definition at line 20 of file pgalloc.h.

#define pmd_populate (   mm,
  pmd,
  pte 
)
Value:
((unsigned long long)page_to_pfn(pte) << \
(unsigned long long) PAGE_SHIFT)))

Definition at line 16 of file pgalloc.h.

#define pmd_populate_kernel (   mm,
  pmd,
  pte 
)    set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) __pa(pte)))

Definition at line 13 of file pgalloc.h.

Function Documentation

pgd_t* pgd_alloc ( struct mm_struct )

Definition at line 40 of file init.c.

void pgd_free ( struct mm_struct mm,
pgd_t pgd 
)

Definition at line 107 of file pgd.c.

pgtable_t pte_alloc_one ( struct mm_struct ,
unsigned  long 
)
read

Definition at line 31 of file pgalloc.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 23 of file pgalloc.c.