Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pgtable-32.h File Reference
#include <asm/addrspace.h>
#include <asm/page.h>
#include <linux/linkage.h>
#include <asm/cachectl.h>
#include <asm/fixmap.h>
#include <asm-generic/pgtable-nopmd.h>

Go to the source code of this file.

Macros

#define PGDIR_SHIFT   (2 * PAGE_SHIFT + PTE_ORDER - PTE_T_LOG2)
 
#define PGDIR_SIZE   (1UL << PGDIR_SHIFT)
 
#define PGDIR_MASK   (~(PGDIR_SIZE-1))
 
#define __PGD_ORDER   (32 - 3 * PAGE_SHIFT + PGD_T_LOG2 + PTE_T_LOG2)
 
#define PGD_ORDER   (__PGD_ORDER >= 0 ? __PGD_ORDER : 0)
 
#define PUD_ORDER   aieeee_attempt_to_allocate_pud
 
#define PMD_ORDER   1
 
#define PTE_ORDER   0
 
#define PTRS_PER_PGD   (USER_PTRS_PER_PGD * 2)
 
#define PTRS_PER_PTE   ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
 
#define USER_PTRS_PER_PGD   (0x80000000UL/PGDIR_SIZE)
 
#define FIRST_USER_ADDRESS   0
 
#define VMALLOC_START   MAP_BASE
 
#define PKMAP_BASE   (0xfe000000UL)
 
#define VMALLOC_END   (FIXADDR_START-2*PAGE_SIZE)
 
#define pte_ERROR(e)   printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
 
#define pgd_ERROR(e)   printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
 
#define pmd_bad(pmd)   (pmd_val(pmd) & ~PAGE_MASK)
 
#define pte_page(x)   pfn_to_page(pte_pfn(x))
 
#define pte_pfn(x)   ((unsigned long)((x).pte >> _PFN_SHIFT))
 
#define pfn_pte(pfn, prot)   __pte(((unsigned long long)(pfn) << _PFN_SHIFT) | pgprot_val(prot))
 
#define __pgd_offset(address)   pgd_index(address)
 
#define __pud_offset(address)   (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
 
#define __pmd_offset(address)   (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
 
#define pgd_offset_k(address)   pgd_offset(&init_mm, address)
 
#define pgd_index(address)   (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
 
#define pgd_offset(mm, addr)   ((mm)->pgd + pgd_index(addr))
 
#define __pte_offset(address)   (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 
#define pte_offset(dir, address)   ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
 
#define pte_offset_kernel(dir, address)   ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
 
#define pte_offset_map(dir, address)   ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
 
#define pte_unmap(pte)   ((void)(pte))
 
#define __swp_type(x)   (((x).val >> 8) & 0x1f)
 
#define __swp_offset(x)   ((x).val >> 13)
 
#define __swp_entry(type, offset)   ((swp_entry_t) { ((type) << 8) | ((offset) << 13) })
 
#define PTE_FILE_MAX_BITS   28
 
#define pte_to_pgoff(_pte)
 
#define pgoff_to_pte(off)
 
#define __pte_to_swp_entry(pte)   ((swp_entry_t) { pte_val(pte) })
 
#define __swp_entry_to_pte(x)   ((pte_t) { (x).val })
 

Functions

void load_pgd (unsigned long pg_dir)
 

Variables

pte_t invalid_pte_table [PAGE_SIZE/sizeof(pte_t)]
 

Macro Definition Documentation

#define __pgd_offset (   address)    pgd_index(address)

Definition at line 119 of file pgtable-32.h.

#define __PGD_ORDER   (32 - 3 * PAGE_SHIFT + PGD_T_LOG2 + PTE_T_LOG2)

Definition at line 38 of file pgtable-32.h.

#define __pmd_offset (   address)    (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))

Definition at line 121 of file pgtable-32.h.

#define __pte_offset (   address)    (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))

Definition at line 132 of file pgtable-32.h.

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

Definition at line 211 of file pgtable-32.h.

#define __pud_offset (   address)    (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))

Definition at line 120 of file pgtable-32.h.

#define __swp_entry (   type,
  offset 
)    ((swp_entry_t) { ((type) << 8) | ((offset) << 13) })

Definition at line 176 of file pgtable-32.h.

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

Definition at line 212 of file pgtable-32.h.

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

Definition at line 175 of file pgtable-32.h.

#define __swp_type (   x)    (((x).val >> 8) & 0x1f)

Definition at line 174 of file pgtable-32.h.

#define FIRST_USER_ADDRESS   0

Definition at line 48 of file pgtable-32.h.

#define pfn_pte (   pfn,
  prot 
)    __pte(((unsigned long long)(pfn) << _PFN_SHIFT) | pgprot_val(prot))

Definition at line 115 of file pgtable-32.h.

#define pgd_ERROR (   e)    printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))

Definition at line 67 of file pgtable-32.h.

#define pgd_index (   address)    (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))

Definition at line 126 of file pgtable-32.h.

#define pgd_offset (   mm,
  addr 
)    ((mm)->pgd + pgd_index(addr))

Definition at line 129 of file pgtable-32.h.

#define pgd_offset_k (   address)    pgd_offset(&init_mm, address)

Definition at line 124 of file pgtable-32.h.

#define PGD_ORDER   (__PGD_ORDER >= 0 ? __PGD_ORDER : 0)

Definition at line 39 of file pgtable-32.h.

#define PGDIR_MASK   (~(PGDIR_SIZE-1))

Definition at line 32 of file pgtable-32.h.

#define PGDIR_SHIFT   (2 * PAGE_SHIFT + PTE_ORDER - PTE_T_LOG2)

Definition at line 30 of file pgtable-32.h.

#define PGDIR_SIZE   (1UL << PGDIR_SHIFT)

Definition at line 31 of file pgtable-32.h.

#define pgoff_to_pte (   off)
Value:
((pte_t) { (((off) & 0x7) << 1) | \
(((off) & 0x8) << 2) | \
(((off) >> 4) << 8) | \

Definition at line 199 of file pgtable-32.h.

#define PKMAP_BASE   (0xfe000000UL)

Definition at line 52 of file pgtable-32.h.

#define pmd_bad (   pmd)    (pmd_val(pmd) & ~PAGE_MASK)

Definition at line 82 of file pgtable-32.h.

#define PMD_ORDER   1

Definition at line 41 of file pgtable-32.h.

#define pte_ERROR (   e)    printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))

Definition at line 64 of file pgtable-32.h.

#define PTE_FILE_MAX_BITS   28

Definition at line 193 of file pgtable-32.h.

#define pte_offset (   dir,
  address 
)    ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))

Definition at line 134 of file pgtable-32.h.

#define pte_offset_kernel (   dir,
  address 
)    ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))

Definition at line 136 of file pgtable-32.h.

#define pte_offset_map (   dir,
  address 
)    ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))

Definition at line 139 of file pgtable-32.h.

#define PTE_ORDER   0

Definition at line 42 of file pgtable-32.h.

#define pte_page (   x)    pfn_to_page(pte_pfn(x))

Definition at line 108 of file pgtable-32.h.

#define pte_pfn (   x)    ((unsigned long)((x).pte >> _PFN_SHIFT))

Definition at line 114 of file pgtable-32.h.

#define pte_to_pgoff (   _pte)
Value:
((((_pte).pte >> 1) & 0x7) | \
(((_pte).pte >> 2) & 0x8) | \
(((_pte).pte >> 8) << 4))

Definition at line 195 of file pgtable-32.h.

#define pte_unmap (   pte)    ((void)(pte))

Definition at line 141 of file pgtable-32.h.

#define PTRS_PER_PGD   (USER_PTRS_PER_PGD * 2)

Definition at line 44 of file pgtable-32.h.

#define PTRS_PER_PTE   ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))

Definition at line 45 of file pgtable-32.h.

#define PUD_ORDER   aieeee_attempt_to_allocate_pud

Definition at line 40 of file pgtable-32.h.

#define USER_PTRS_PER_PGD   (0x80000000UL/PGDIR_SIZE)

Definition at line 47 of file pgtable-32.h.

#define VMALLOC_END   (FIXADDR_START-2*PAGE_SIZE)

Definition at line 57 of file pgtable-32.h.

#define VMALLOC_START   MAP_BASE

Definition at line 50 of file pgtable-32.h.

Function Documentation

void load_pgd ( unsigned long  pg_dir)

Variable Documentation

pte_t invalid_pte_table ( pte_t  )

Definition at line 488 of file init.c.