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

Go to the source code of this file.

Macros

#define UL(x)   _AC(x, UL)
 
#define PAGE_OFFSET   UL(0xffffffc000000000)
 
#define MODULES_END   (PAGE_OFFSET)
 
#define MODULES_VADDR   (MODULES_END - SZ_64M)
 
#define VA_BITS   (39)
 
#define TASK_SIZE_64   (UL(1) << VA_BITS)
 
#define TASK_SIZE   TASK_SIZE_64
 
#define TASK_UNMAPPED_BASE   (PAGE_ALIGN(TASK_SIZE / 4))
 
#define __virt_to_phys(x)   (((phys_addr_t)(x) - PAGE_OFFSET + PHYS_OFFSET))
 
#define __phys_to_virt(x)   ((unsigned long)((x) - PHYS_OFFSET + PAGE_OFFSET))
 
#define __phys_to_pfn(paddr)   ((unsigned long)((paddr) >> PAGE_SHIFT))
 
#define __pfn_to_phys(pfn)   ((phys_addr_t)(pfn) << PAGE_SHIFT)
 
#define page_to_phys(page)   (__pfn_to_phys(page_to_pfn(page)))
 
#define phys_to_page(phys)   (pfn_to_page(__phys_to_pfn(phys)))
 
#define MT_DEVICE_nGnRnE   0
 
#define MT_DEVICE_nGnRE   1
 
#define MT_DEVICE_GRE   2
 
#define MT_NORMAL_NC   3
 
#define MT_NORMAL   4
 
#define PHYS_OFFSET   ({ memstart_addr; })
 
#define PHYS_PFN_OFFSET   (PHYS_OFFSET >> PAGE_SHIFT)
 
#define __pa(x)   __virt_to_phys((unsigned long)(x))
 
#define __va(x)   ((void *)__phys_to_virt((phys_addr_t)(x)))
 
#define pfn_to_kaddr(pfn)   __va((pfn) << PAGE_SHIFT)
 
#define ARCH_PFN_OFFSET   PHYS_PFN_OFFSET
 
#define virt_to_page(kaddr)   pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 
#define virt_addr_valid(kaddr)
 

Variables

phys_addr_t memstart_addr
 

Macro Definition Documentation

#define __pa (   x)    __virt_to_phys((unsigned long)(x))

Definition at line 126 of file memory.h.

#define __pfn_to_phys (   pfn)    ((phys_addr_t)(pfn) << PAGE_SHIFT)

Definition at line 75 of file memory.h.

#define __phys_to_pfn (   paddr)    ((unsigned long)((paddr) >> PAGE_SHIFT))

Definition at line 74 of file memory.h.

#define __phys_to_virt (   x)    ((unsigned long)((x) - PHYS_OFFSET + PAGE_OFFSET))

Definition at line 69 of file memory.h.

#define __va (   x)    ((void *)__phys_to_virt((phys_addr_t)(x)))

Definition at line 127 of file memory.h.

#define __virt_to_phys (   x)    (((phys_addr_t)(x) - PAGE_OFFSET + PHYS_OFFSET))

Definition at line 68 of file memory.h.

#define ARCH_PFN_OFFSET   PHYS_PFN_OFFSET

Definition at line 134 of file memory.h.

#define MODULES_END   (PAGE_OFFSET)

Definition at line 44 of file memory.h.

#define MODULES_VADDR   (MODULES_END - SZ_64M)

Definition at line 45 of file memory.h.

#define MT_DEVICE_GRE   2

Definition at line 88 of file memory.h.

#define MT_DEVICE_nGnRE   1

Definition at line 87 of file memory.h.

#define MT_DEVICE_nGnRnE   0

Definition at line 86 of file memory.h.

#define MT_NORMAL   4

Definition at line 90 of file memory.h.

#define MT_NORMAL_NC   3

Definition at line 89 of file memory.h.

#define PAGE_OFFSET   UL(0xffffffc000000000)

Definition at line 43 of file memory.h.

#define page_to_phys (   page)    (__pfn_to_phys(page_to_pfn(page)))

Definition at line 80 of file memory.h.

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

Definition at line 128 of file memory.h.

#define PHYS_OFFSET   ({ memstart_addr; })

Definition at line 96 of file memory.h.

#define PHYS_PFN_OFFSET   (PHYS_OFFSET >> PAGE_SHIFT)

Definition at line 106 of file memory.h.

#define phys_to_page (   phys)    (pfn_to_page(__phys_to_pfn(phys)))

Definition at line 81 of file memory.h.

#define TASK_SIZE   TASK_SIZE_64

Definition at line 54 of file memory.h.

#define TASK_SIZE_64   (UL(1) << VA_BITS)

Definition at line 47 of file memory.h.

#define TASK_UNMAPPED_BASE   (PAGE_ALIGN(TASK_SIZE / 4))

Definition at line 57 of file memory.h.

#define UL (   x)    _AC(x, UL)

Definition at line 33 of file memory.h.

#define VA_BITS   (39)

Definition at line 46 of file memory.h.

#define virt_addr_valid (   kaddr)
Value:
(((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
((void *)(kaddr) < (void *)high_memory))

Definition at line 137 of file memory.h.

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

Definition at line 136 of file memory.h.

Variable Documentation

phys_addr_t memstart_addr

Definition at line 63 of file init_32.c.