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

Go to the source code of this file.

Macros

#define pmd_populate_kernel(mm, pmd, pte)   set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte)))
 
#define __pte_free_tlb(tlb, pte, addr)   tlb_remove_page((tlb), (pte))
 
#define pmd_pgtable(pmd)   pmd_page(pmd)
 
#define check_pgt_cache()   do { } while (0)
 

Functions

pte_tpte_alloc_one_kernel (struct mm_struct *mm, unsigned long address)
 

Variables

int mem_init_done
 

Macro Definition Documentation

#define __pte_free_tlb (   tlb,
  pte,
  addr 
)    tlb_remove_page((tlb), (pte))

Definition at line 97 of file pgalloc.h.

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

Definition at line 100 of file pgalloc.h.

#define pmd_pgtable (   pmd)    pmd_page(pmd)

Definition at line 98 of file pgalloc.h.

#define pmd_populate_kernel (   mm,
  pmd,
  pte 
)    set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte)))

Definition at line 30 of file pgalloc.h.

Function Documentation

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.

Variable Documentation

int mem_init_done

Definition at line 30 of file init.c.