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

Go to the source code of this file.

Macros

#define MAX_PGTABLE_INDEX_SIZE   0
 
#define pmd_free(mm, x)   do { } while (0)
 
#define __pmd_free_tlb(tlb, x, a)   do { } while (0)
 
#define pmd_populate_kernel(mm, pmd, pte)   (pmd_val(*(pmd)) = __pa(pte) | _PMD_PRESENT)
 
#define pmd_populate(mm, pmd, pte)   (pmd_val(*(pmd)) = (page_to_pfn(pte) << PAGE_SHIFT) | _PMD_PRESENT)
 
#define pmd_pgtable(pmd)   pmd_page(pmd)
 
#define check_pgt_cache()   do { } while (0)
 

Functions

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

Macro Definition Documentation

#define __pmd_free_tlb (   tlb,
  x,
  a 
)    do { } while (0)

Definition at line 20 of file pgalloc-32.h.

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

Definition at line 46 of file pgalloc-32.h.

#define MAX_PGTABLE_INDEX_SIZE   0

Definition at line 7 of file pgalloc-32.h.

#define pmd_free (   mm,
  x 
)    do { } while (0)

Definition at line 19 of file pgalloc-32.h.

#define pmd_pgtable (   pmd)    pmd_page(pmd)

Definition at line 28 of file pgalloc-32.h.

#define pmd_populate (   mm,
  pmd,
  pte 
)    (pmd_val(*(pmd)) = (page_to_pfn(pte) << PAGE_SHIFT) | _PMD_PRESENT)

Definition at line 26 of file pgalloc-32.h.

#define pmd_populate_kernel (   mm,
  pmd,
  pte 
)    (pmd_val(*(pmd)) = __pa(pte) | _PMD_PRESENT)

Definition at line 24 of file pgalloc-32.h.

Function Documentation

void __bad_pte ( pmd_t pmd)
pgd_t* pgd_alloc ( struct mm_struct mm)

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 mm,
unsigned long  addr 
)
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.