Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
page.h File Reference
#include <linux/const.h>
#include <asm/types.h>
#include <asm/cache.h>
#include <asm-generic/memory_model.h>
#include <asm-generic/getorder.h>
#include <asm/pdc.h>

Go to the source code of this file.

Data Structures

struct  pte_t
 
struct  pmd_t
 
struct  pgd_t
 
struct  pgprot_t
 
struct  __physmem_range
 

Macros

#define PAGE_SIZE   (_AC(1,UL) << PAGE_SHIFT)
 
#define PAGE_MASK   (~(PAGE_SIZE-1))
 
#define clear_page(page)   memset((void *)(page), 0, PAGE_SIZE)
 
#define copy_page(to, from)   copy_user_page_asm((void *)(to), (void *)(from))
 
#define STRICT_MM_TYPECHECKS
 
#define pte_val(x)   ((x).pte)
 
#define pmd_val(x)   ((x).pmd + 0)
 
#define pgd_val(x)   ((x).pgd + 0)
 
#define pgprot_val(x)   ((x).pgprot)
 
#define __pte(x)   ((pte_t) { (x) } )
 
#define __pmd(x)   ((pmd_t) { (x) } )
 
#define __pgd(x)   ((pgd_t) { (x) } )
 
#define __pgprot(x)   ((pgprot_t) { (x) } )
 
#define __pmd_val_set(x, n)   (x).pmd = (n)
 
#define __pgd_val_set(x, n)   (x).pgd = (n)
 
#define BITS_PER_PTE_ENTRY   2
 
#define BITS_PER_PMD_ENTRY   2
 
#define BITS_PER_PGD_ENTRY   BITS_PER_PMD_ENTRY
 
#define PGD_ENTRY_SIZE   (1UL << BITS_PER_PGD_ENTRY)
 
#define PMD_ENTRY_SIZE   (1UL << BITS_PER_PMD_ENTRY)
 
#define PTE_ENTRY_SIZE   (1UL << BITS_PER_PTE_ENTRY)
 
#define LINUX_GATEWAY_SPACE   0
 
#define __PAGE_OFFSET   (0x10000000) /* 256MB */
 
#define PAGE_OFFSET   ((unsigned long)__PAGE_OFFSET)
 
#define GATEWAY_PAGE_SIZE   0x4000
 
#define KERNEL_BINARY_TEXT_START   (__PAGE_OFFSET + 0x100000)
 
#define __pa(x)   ((unsigned long)(x)-PAGE_OFFSET)
 
#define __va(x)   ((void *)((unsigned long)(x)+PAGE_OFFSET))
 
#define pfn_valid(pfn)   ((pfn) < max_mapnr)
 
#define virt_addr_valid(kaddr)   pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 
#define page_to_phys(page)   (page_to_pfn(page) << PAGE_SHIFT)
 
#define virt_to_page(kaddr)   pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 
#define VM_DATA_DEFAULT_FLAGS
 
#define PAGE0   ((struct zeropage *)__PAGE_OFFSET)
 

Typedefs

typedef struct pagepgtable_t
 
typedef struct __physmem_range physmem_range_t
 

Functions

void copy_user_page_asm (void *to, void *from)
 
void copy_user_page (void *vto, void *vfrom, unsigned long vaddr, struct page *pg)
 
void clear_user_page (void *page, unsigned long vaddr, struct page *pg)
 

Variables

physmem_range_t pmem_ranges []
 
int npmem_ranges
 

Macro Definition Documentation

#define __pa (   x)    ((unsigned long)(x)-PAGE_OFFSET)

Definition at line 139 of file page.h.

#define __PAGE_OFFSET   (0x10000000) /* 256MB */

Definition at line 121 of file page.h.

#define __pgd (   x)    ((pgd_t) { (x) } )

Definition at line 55 of file page.h.

#define __pgd_val_set (   x,
  n 
)    (x).pgd = (n)

Definition at line 59 of file page.h.

#define __pgprot (   x)    ((pgprot_t) { (x) } )

Definition at line 56 of file page.h.

#define __pmd (   x)    ((pmd_t) { (x) } )

Definition at line 54 of file page.h.

#define __pmd_val_set (   x,
  n 
)    (x).pmd = (n)

Definition at line 58 of file page.h.

#define __pte (   x)    ((pte_t) { (x) } )

Definition at line 53 of file page.h.

#define __va (   x)    ((void *)((unsigned long)(x)+PAGE_OFFSET))

Definition at line 140 of file page.h.

#define BITS_PER_PGD_ENTRY   BITS_PER_PMD_ENTRY

Definition at line 107 of file page.h.

#define BITS_PER_PMD_ENTRY   2

Definition at line 106 of file page.h.

#define BITS_PER_PTE_ENTRY   2

Definition at line 105 of file page.h.

#define clear_page (   page)    memset((void *)(page), 0, PAGE_SIZE)

Definition at line 24 of file page.h.

#define copy_page (   to,
  from 
)    copy_user_page_asm((void *)(to), (void *)(from))

Definition at line 25 of file page.h.

#define GATEWAY_PAGE_SIZE   0x4000

Definition at line 127 of file page.h.

#define KERNEL_BINARY_TEXT_START   (__PAGE_OFFSET + 0x100000)

Definition at line 132 of file page.h.

#define LINUX_GATEWAY_SPACE   0

Definition at line 113 of file page.h.

#define PAGE0   ((struct zeropage *)__PAGE_OFFSET)

Definition at line 165 of file page.h.

#define PAGE_MASK   (~(PAGE_SIZE-1))

Definition at line 16 of file page.h.

#define PAGE_OFFSET   ((unsigned long)__PAGE_OFFSET)

Definition at line 124 of file page.h.

#define PAGE_SIZE   (_AC(1,UL) << PAGE_SHIFT)

Definition at line 15 of file page.h.

#define page_to_phys (   page)    (page_to_pfn(page) << PAGE_SHIFT)

Definition at line 155 of file page.h.

#define pfn_valid (   pfn)    ((pfn) < max_mapnr)

Definition at line 143 of file page.h.

#define PGD_ENTRY_SIZE   (1UL << BITS_PER_PGD_ENTRY)

Definition at line 109 of file page.h.

#define pgd_val (   x)    ((x).pgd + 0)

Definition at line 50 of file page.h.

#define pgprot_val (   x)    ((x).pgprot)

Definition at line 51 of file page.h.

#define PMD_ENTRY_SIZE   (1UL << BITS_PER_PMD_ENTRY)

Definition at line 110 of file page.h.

#define pmd_val (   x)    ((x).pmd + 0)

Definition at line 49 of file page.h.

#define PTE_ENTRY_SIZE   (1UL << BITS_PER_PTE_ENTRY)

Definition at line 111 of file page.h.

#define pte_val (   x)    ((x).pte)

Definition at line 47 of file page.h.

#define STRICT_MM_TYPECHECKS

Definition at line 37 of file page.h.

#define virt_addr_valid (   kaddr)    pfn_valid(__pa(kaddr) >> PAGE_SHIFT)

Definition at line 153 of file page.h.

#define virt_to_page (   kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)

Definition at line 156 of file page.h.

#define VM_DATA_DEFAULT_FLAGS
Value:
(VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

Definition at line 158 of file page.h.

Typedef Documentation

typedef struct page* pgtable_t

Definition at line 85 of file page.h.

Function Documentation

void clear_user_page ( void page,
unsigned long  vaddr,
struct page pg 
)

Definition at line 379 of file cache.c.

void copy_user_page ( void vto,
void vfrom,
unsigned long  vaddr,
struct page pg 
)

Definition at line 402 of file cache.c.

void copy_user_page_asm ( void to,
void from 
)

Variable Documentation

int npmem_ranges
physmem_range_t pmem_ranges

Definition at line 76 of file init.c.