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

Go to the source code of this file.

Data Structures

struct  hugepd_t
 

Macros

#define PAGE_SHIFT   12
 
#define PAGE_SIZE   (ASM_CONST(1) << PAGE_SHIFT)
 
#define HPAGE_SHIFT   PAGE_SHIFT
 
#define HPAGE_SIZE   ((1UL) << HPAGE_SHIFT)
 
#define HPAGE_MASK   (~(HPAGE_SIZE - 1))
 
#define HUGETLB_PAGE_ORDER   (HPAGE_SHIFT - PAGE_SHIFT)
 
#define HUGE_MAX_HSTATE   (MMU_PAGE_COUNT-1)
 
#define __HAVE_ARCH_GATE_AREA   1
 
#define PAGE_MASK   (~((1 << PAGE_SHIFT) - 1))
 
#define KERNELBASE   ASM_CONST(CONFIG_KERNEL_START)
 
#define PAGE_OFFSET   ASM_CONST(CONFIG_PAGE_OFFSET)
 
#define LOAD_OFFSET   ASM_CONST((CONFIG_KERNEL_START-CONFIG_PHYSICAL_START))
 
#define PHYSICAL_START   ASM_CONST(CONFIG_PHYSICAL_START)
 
#define VIRT_PHYS_OFFSET   (KERNELBASE - PHYSICAL_START)
 
#define MEMORY_START   (PHYSICAL_START + PAGE_OFFSET - KERNELBASE)
 
#define virt_to_page(kaddr)   pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 
#define pfn_to_kaddr(pfn)   __va((pfn) << PAGE_SHIFT)
 
#define virt_addr_valid(kaddr)   pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 
#define __va(x)   ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START))
 
#define __pa(x)   ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START)
 
#define VM_DATA_DEFAULT_FLAGS32
 
#define VM_DATA_DEFAULT_FLAGS64
 
#define _ALIGN_UP(addr, size)   (((addr)+((size)-1))&(~((size)-1)))
 
#define _ALIGN_DOWN(addr, size)   ((addr)&(~((size)-1)))
 
#define _ALIGN(addr, size)   _ALIGN_UP(addr,size)
 
#define is_kernel_addr(x)   ((x) >= PAGE_OFFSET)
 
#define PD_HUGE   0x80000000
 
#define HUGEPD_SHIFT_MASK   0x3f
 
#define pte_val(x)   (x)
 
#define __pte(x)   (x)
 
#define pgd_val(x)   (x)
 
#define pgprot_val(x)   (x)
 
#define __pgd(x)   (x)
 
#define __pgprot(x)   (x)
 
#define is_hugepd(pdep)   0
 

Typedefs

typedef pte_basic_t pte_t
 
typedef pte_t real_pte_t
 
typedef unsigned long pgd_t
 
typedef unsigned long pgprot_t
 
typedef struct pagepgtable_t
 

Functions

void clear_user_page (void *page, unsigned long vaddr, struct page *pg)
 
void copy_user_page (void *to, void *from, unsigned long vaddr, struct page *p)
 
int page_is_ram (unsigned long pfn)
 
int devmem_is_allowed (unsigned long pfn)
 

Macro Definition Documentation

#define __HAVE_ARCH_GATE_AREA   1

Definition at line 52 of file page.h.

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

Definition at line 215 of file page.h.

#define __pgd (   x)    (x)

Definition at line 349 of file page.h.

#define __pgprot (   x)    (x)

Definition at line 350 of file page.h.

#define __pte (   x)    (x)

Definition at line 323 of file page.h.

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

Definition at line 214 of file page.h.

#define _ALIGN (   addr,
  size 
)    _ALIGN_UP(addr,size)

Definition at line 240 of file page.h.

#define _ALIGN_DOWN (   addr,
  size 
)    ((addr)&(~((size)-1)))

Definition at line 237 of file page.h.

#define _ALIGN_UP (   addr,
  size 
)    (((addr)+((size)-1))&(~((size)-1)))

Definition at line 236 of file page.h.

#define HPAGE_MASK   (~(HPAGE_SIZE - 1))

Definition at line 46 of file page.h.

#define HPAGE_SHIFT   PAGE_SHIFT

Definition at line 43 of file page.h.

#define HPAGE_SIZE   ((1UL) << HPAGE_SHIFT)

Definition at line 45 of file page.h.

#define HUGE_MAX_HSTATE   (MMU_PAGE_COUNT-1)

Definition at line 48 of file page.h.

#define HUGEPD_SHIFT_MASK   0x3f

Definition at line 268 of file page.h.

#define HUGETLB_PAGE_ORDER   (HPAGE_SHIFT - PAGE_SHIFT)

Definition at line 47 of file page.h.

#define is_hugepd (   pdep)    0

Definition at line 364 of file page.h.

#define is_kernel_addr (   x)    ((x) >= PAGE_OFFSET)

Definition at line 249 of file page.h.

#define KERNELBASE   ASM_CONST(CONFIG_KERNEL_START)

Definition at line 91 of file page.h.

#define LOAD_OFFSET   ASM_CONST((CONFIG_KERNEL_START-CONFIG_PHYSICAL_START))

Definition at line 93 of file page.h.

#define MEMORY_START   (PHYSICAL_START + PAGE_OFFSET - KERNELBASE)

Definition at line 125 of file page.h.

#define PAGE_MASK   (~((1 << PAGE_SHIFT) - 1))

Definition at line 59 of file page.h.

#define PAGE_OFFSET   ASM_CONST(CONFIG_PAGE_OFFSET)

Definition at line 92 of file page.h.

#define PAGE_SHIFT   12

Definition at line 34 of file page.h.

#define PAGE_SIZE   (ASM_CONST(1) << PAGE_SHIFT)

Definition at line 37 of file page.h.

#define PD_HUGE   0x80000000

Definition at line 261 of file page.h.

#define pfn_to_kaddr (   pfn)    __va((pfn) << PAGE_SHIFT)

Definition at line 134 of file page.h.

#define pgd_val (   x)    (x)

Definition at line 345 of file page.h.

#define pgprot_val (   x)    (x)

Definition at line 346 of file page.h.

#define PHYSICAL_START   ASM_CONST(CONFIG_PHYSICAL_START)

Definition at line 109 of file page.h.

#define pte_val (   x)    (x)

Definition at line 322 of file page.h.

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

Definition at line 135 of file page.h.

#define VIRT_PHYS_OFFSET   (KERNELBASE - PHYSICAL_START)

Definition at line 116 of file page.h.

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

Definition at line 133 of file page.h.

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

Definition at line 223 of file page.h.

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

Definition at line 226 of file page.h.

Typedef Documentation

typedef unsigned long pgd_t

Definition at line 344 of file page.h.

typedef unsigned long pgprot_t

Definition at line 348 of file page.h.

typedef struct page* pgtable_t

Definition at line 381 of file page.h.

typedef pte_basic_t pte_t

Definition at line 321 of file page.h.

typedef pte_t real_pte_t

Definition at line 328 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 to,
void from,
unsigned long  vaddr,
struct page p 
)

Definition at line 402 of file cache.c.

int devmem_is_allowed ( unsigned long  pfn)

Definition at line 663 of file init.c.

int page_is_ram ( unsigned long  pfn)

Definition at line 464 of file setup.c.