Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pgtable_64.h File Reference
#include <linux/const.h>
#include <asm/pgtable_64_types.h>
#include <asm/processor.h>
#include <linux/bitops.h>
#include <linux/threads.h>

Go to the source code of this file.

Macros

#define swapper_pg_dir   init_level4_pgt
 
#define pte_ERROR(e)
 
#define pmd_ERROR(e)
 
#define pud_ERROR(e)
 
#define pgd_ERROR(e)
 
#define mk_kernel_pgd(address)   __pgd((address) | _KERNPG_TABLE)
 
#define pte_to_pgoff(pte)   ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
 
#define pgoff_to_pte(off)
 
#define PTE_FILE_MAX_BITS   __PHYSICAL_MASK_SHIFT
 
#define pte_offset_map(dir, address)   pte_offset_kernel((dir), (address))
 
#define pte_unmap(pte)   ((void)(pte))/* NOP */
 
#define update_mmu_cache(vma, address, ptep)   do { } while (0)
 
#define update_mmu_cache_pmd(vma, address, pmd)   do { } while (0)
 
#define SWP_TYPE_BITS   (_PAGE_BIT_PROTNONE - _PAGE_BIT_PRESENT - 1)
 
#define SWP_OFFSET_SHIFT   (_PAGE_BIT_FILE + 1)
 
#define MAX_SWAPFILES_CHECK()   BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS)
 
#define __swp_type(x)
 
#define __swp_offset(x)   ((x).val >> SWP_OFFSET_SHIFT)
 
#define __swp_entry(type, offset)
 
#define __pte_to_swp_entry(pte)   ((swp_entry_t) { pte_val((pte)) })
 
#define __swp_entry_to_pte(x)   ((pte_t) { .pte = (x).val })
 
#define HAVE_ARCH_UNMAPPED_AREA
 
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
 
#define pgtable_cache_init()   do { } while (0)
 
#define check_pgt_cache()   do { } while (0)
 
#define PAGE_AGP   PAGE_KERNEL_NOCACHE
 
#define HAVE_PAGE_AGP   1
 
#define kc_vaddr_to_offset(v)   ((v) & __VIRTUAL_MASK)
 
#define kc_offset_to_vaddr(o)   ((o) | ~__VIRTUAL_MASK)
 
#define __HAVE_ARCH_PTE_SAME
 

Functions

void paging_init (void)
 
void set_pte_vaddr_pud (pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
 
void sync_global_pgds (unsigned long start, unsigned long end)
 
int kern_addr_valid (unsigned long addr)
 
void cleanup_highmap (void)
 

Variables

pud_t level3_kernel_pgt [512]
 
pud_t level3_ident_pgt [512]
 
pmd_t level2_kernel_pgt [512]
 
pmd_t level2_fixmap_pgt [512]
 
pmd_t level2_ident_pgt [512]
 
pgd_t init_level4_pgt []
 

Macro Definition Documentation

#define __HAVE_ARCH_PTE_SAME

Definition at line 184 of file pgtable_64.h.

#define __pte_to_swp_entry (   pte)    ((swp_entry_t) { pte_val((pte)) })

Definition at line 165 of file pgtable_64.h.

#define __swp_entry (   type,
  offset 
)
Value:
((type) << (_PAGE_BIT_PRESENT + 1)) \

Definition at line 162 of file pgtable_64.h.

#define __swp_entry_to_pte (   x)    ((pte_t) { .pte = (x).val })

Definition at line 166 of file pgtable_64.h.

#define __swp_offset (   x)    ((x).val >> SWP_OFFSET_SHIFT)

Definition at line 161 of file pgtable_64.h.

#define __swp_type (   x)
Value:
(((x).val >> (_PAGE_BIT_PRESENT + 1)) \
& ((1U << SWP_TYPE_BITS) - 1))

Definition at line 159 of file pgtable_64.h.

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

Definition at line 175 of file pgtable_64.h.

#define HAVE_ARCH_UNMAPPED_AREA

Definition at line 171 of file pgtable_64.h.

#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN

Definition at line 172 of file pgtable_64.h.

#define HAVE_PAGE_AGP   1

Definition at line 178 of file pgtable_64.h.

#define kc_offset_to_vaddr (   o)    ((o) | ~__VIRTUAL_MASK)

Definition at line 182 of file pgtable_64.h.

#define kc_vaddr_to_offset (   v)    ((v) & __VIRTUAL_MASK)

Definition at line 181 of file pgtable_64.h.

#define MAX_SWAPFILES_CHECK ( )    BUILD_BUG_ON(MAX_SWAPFILES_SHIFT > SWP_TYPE_BITS)

Definition at line 157 of file pgtable_64.h.

#define mk_kernel_pgd (   address)    __pgd((address) | _KERNPG_TABLE)

Definition at line 129 of file pgtable_64.h.

#define PAGE_AGP   PAGE_KERNEL_NOCACHE

Definition at line 177 of file pgtable_64.h.

#define pgd_ERROR (   e)
Value:
pr_err("%s:%d: bad pgd %p(%016lx)\n", \
__FILE__, __LINE__, &(e), pgd_val(e))

Definition at line 37 of file pgtable_64.h.

#define pgoff_to_pte (   off)
Value:
((pte_t) { .pte = ((off) << PAGE_SHIFT) | \
_PAGE_FILE })

Definition at line 135 of file pgtable_64.h.

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

Definition at line 174 of file pgtable_64.h.

#define pmd_ERROR (   e)
Value:
pr_err("%s:%d: bad pmd %p(%016lx)\n", \
__FILE__, __LINE__, &(e), pmd_val(e))

Definition at line 31 of file pgtable_64.h.

#define pte_ERROR (   e)
Value:
pr_err("%s:%d: bad pte %p(%016lx)\n", \
__FILE__, __LINE__, &(e), pte_val(e))

Definition at line 28 of file pgtable_64.h.

#define PTE_FILE_MAX_BITS   __PHYSICAL_MASK_SHIFT

Definition at line 137 of file pgtable_64.h.

#define pte_offset_map (   dir,
  address 
)    pte_offset_kernel((dir), (address))

Definition at line 142 of file pgtable_64.h.

#define pte_to_pgoff (   pte)    ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)

Definition at line 134 of file pgtable_64.h.

#define pte_unmap (   pte)    ((void)(pte))/* NOP */

Definition at line 143 of file pgtable_64.h.

#define pud_ERROR (   e)
Value:
pr_err("%s:%d: bad pud %p(%016lx)\n", \
__FILE__, __LINE__, &(e), pud_val(e))

Definition at line 34 of file pgtable_64.h.

#define swapper_pg_dir   init_level4_pgt

Definition at line 24 of file pgtable_64.h.

#define SWP_OFFSET_SHIFT   (_PAGE_BIT_FILE + 1)

Definition at line 154 of file pgtable_64.h.

#define SWP_TYPE_BITS   (_PAGE_BIT_PROTNONE - _PAGE_BIT_PRESENT - 1)

Definition at line 153 of file pgtable_64.h.

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

Definition at line 145 of file pgtable_64.h.

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

Definition at line 146 of file pgtable_64.h.

Function Documentation

void cleanup_highmap ( void  )

Definition at line 302 of file init_64.c.

int kern_addr_valid ( unsigned long  addr)

Definition at line 322 of file mmu.c.

void paging_init ( void  )

paging_init - setup page tables

paging_init() sets up the page tables for each node of the system and frees the bootmem allocator memory for general use.

Definition at line 238 of file init.c.

void set_pte_vaddr_pud ( pud_t pud_page,
unsigned long  vaddr,
pte_t  new_pte 
)

Definition at line 195 of file init_64.c.

void sync_global_pgds ( unsigned long  start,
unsigned long  end 
)

Definition at line 104 of file init_64.c.

Variable Documentation

pgd_t init_level4_pgt[]
pmd_t level2_fixmap_pgt[512]
pmd_t level2_ident_pgt[512]
pmd_t level2_kernel_pgt[512]
pud_t level3_ident_pgt[512]
pud_t level3_kernel_pgt[512]