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 <asm/processor.h>
#include <asm/types.h>
#include <asm/cache.h>
#include <platform/hardware.h>
#include <asm-generic/getorder.h>
#include <asm-generic/memory_model.h>

Go to the source code of this file.

Data Structures

struct  pte_t
 
struct  pgd_t
 
struct  pgprot_t
 

Macros

#define XCHAL_KSEG_CACHED_VADDR   0xd0000000
 
#define XCHAL_KSEG_BYPASS_VADDR   0xd8000000
 
#define XCHAL_KSEG_PADDR   0x00000000
 
#define XCHAL_KSEG_SIZE   0x08000000
 
#define PAGE_SHIFT   12
 
#define PAGE_SIZE   (__XTENSA_UL_CONST(1) << PAGE_SHIFT)
 
#define PAGE_MASK   (~(PAGE_SIZE-1))
 
#define PAGE_OFFSET   0
 
#define MAX_MEM_PFN   (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE)
 
#define PGTABLE_START   0x80000000
 
#define DCACHE_ALIAS_ORDER   0
 
#define ICACHE_ALIAS_ORDER   0
 
#define pte_val(x)   ((x).pte)
 
#define pgd_val(x)   ((x).pgd)
 
#define pgprot_val(x)   ((x).pgprot)
 
#define __pte(x)   ((pte_t) { (x) } )
 
#define __pgd(x)   ((pgd_t) { (x) } )
 
#define __pgprot(x)   ((pgprot_t) { (x) } )
 
#define clear_user_page(page, vaddr, pg)   clear_page(page)
 
#define copy_user_page(to, from, vaddr, pg)   copy_page(to, from)
 
#define ARCH_PFN_OFFSET   (PLATFORM_DEFAULT_MEM_START >> PAGE_SHIFT)
 
#define __pa(x)   ((unsigned long) (x) - PAGE_OFFSET)
 
#define __va(x)   ((void *)((unsigned long) (x) + PAGE_OFFSET))
 
#define pfn_valid(pfn)   ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
 
#define virt_to_page(kaddr)   pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 
#define page_to_virt(page)   __va(page_to_pfn(page) << PAGE_SHIFT)
 
#define virt_addr_valid(kaddr)   pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 
#define page_to_phys(page)   (page_to_pfn(page) << PAGE_SHIFT)
 
#define VM_DATA_DEFAULT_FLAGS
 

Typedefs

typedef struct pagepgtable_t
 

Functions

void clear_page (void *page)
 
void copy_page (void *to, void *from)
 

Macro Definition Documentation

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

Definition at line 162 of file page.h.

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

Definition at line 113 of file page.h.

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

Definition at line 114 of file page.h.

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

Definition at line 112 of file page.h.

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

Definition at line 163 of file page.h.

#define ARCH_PFN_OFFSET   (PLATFORM_DEFAULT_MEM_START >> PAGE_SHIFT)

Definition at line 160 of file page.h.

#define clear_user_page (   page,
  vaddr,
  pg 
)    clear_page(page)

Definition at line 149 of file page.h.

#define copy_user_page (   to,
  from,
  vaddr,
  pg 
)    copy_page(to, from)

Definition at line 150 of file page.h.

#define DCACHE_ALIAS_ORDER   0

Definition at line 80 of file page.h.

#define ICACHE_ALIAS_ORDER   0

Definition at line 89 of file page.h.

Definition at line 41 of file page.h.

#define PAGE_MASK   (~(PAGE_SIZE-1))

Definition at line 34 of file page.h.

#define PAGE_OFFSET   0

Definition at line 40 of file page.h.

#define PAGE_SHIFT   12

Definition at line 32 of file page.h.

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

Definition at line 33 of file page.h.

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

Definition at line 172 of file page.h.

#define page_to_virt (   page)    __va(page_to_pfn(page) << PAGE_SHIFT)

Definition at line 170 of file page.h.

#define pfn_valid (   pfn)    ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)

Definition at line 164 of file page.h.

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

Definition at line 109 of file page.h.

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

Definition at line 110 of file page.h.

#define PGTABLE_START   0x80000000

Definition at line 44 of file page.h.

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

Definition at line 108 of file page.h.

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

Definition at line 171 of file page.h.

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

Definition at line 169 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 176 of file page.h.

#define XCHAL_KSEG_BYPASS_VADDR   0xd8000000

Definition at line 24 of file page.h.

#define XCHAL_KSEG_CACHED_VADDR   0xd0000000

Definition at line 23 of file page.h.

#define XCHAL_KSEG_PADDR   0x00000000

Definition at line 25 of file page.h.

#define XCHAL_KSEG_SIZE   0x08000000

Definition at line 26 of file page.h.

Typedef Documentation

typedef struct page* pgtable_t

Definition at line 106 of file page.h.

Function Documentation

void clear_page ( void page)
void copy_page ( void to,
void from 
)

Definition at line 22 of file nommu.c.