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

Go to the source code of this file.

Macros

#define UL(x)   _AC(x, UL)
 
#define TASK_SIZE   (CONFIG_DRAM_SIZE)
 
#define TASK_UNMAPPED_BASE   UL(0x00000000)
 
#define PHYS_OFFSET   UL(CONFIG_DRAM_BASE)
 
#define END_MEM   (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
 
#define PAGE_OFFSET   (PHYS_OFFSET)
 
#define MODULES_END   (END_MEM)
 
#define MODULES_VADDR   (PHYS_OFFSET)
 
#define XIP_VIRT_ADDR(physaddr)   (physaddr)
 
#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 __virt_to_phys(x)   ((x) - PAGE_OFFSET + PHYS_OFFSET)
 
#define __phys_to_virt(x)   ((x) - PHYS_OFFSET + PAGE_OFFSET)
 
#define PHYS_PFN_OFFSET   (PHYS_OFFSET >> PAGE_SHIFT)
 
#define __pa(x)   __virt_to_phys((unsigned long)(x))
 
#define __va(x)   ((void *)__phys_to_virt((unsigned long)(x)))
 
#define pfn_to_kaddr(pfn)   __va((pfn) << PAGE_SHIFT)
 
#define __virt_to_bus   __virt_to_phys
 
#define __bus_to_virt   __phys_to_virt
 
#define __pfn_to_bus(x)   __pfn_to_phys(x)
 
#define __bus_to_pfn(x)   __phys_to_pfn(x)
 
#define ARCH_PFN_OFFSET   PHYS_PFN_OFFSET
 
#define virt_to_page(kaddr)   pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 
#define virt_addr_valid(kaddr)   ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
 

Macro Definition Documentation

#define __bus_to_pfn (   x)    __phys_to_pfn(x)

Definition at line 245 of file memory.h.

#define __bus_to_virt   __phys_to_virt

Definition at line 243 of file memory.h.

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

Definition at line 231 of file memory.h.

#define __pfn_to_bus (   x)    __pfn_to_phys(x)

Definition at line 244 of file memory.h.

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

Definition at line 136 of file memory.h.

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

Definition at line 135 of file memory.h.

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

Definition at line 187 of file memory.h.

#define __va (   x)    ((void *)__phys_to_virt((unsigned long)(x)))

Definition at line 232 of file memory.h.

#define __virt_to_bus   __virt_to_phys

Definition at line 242 of file memory.h.

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

Definition at line 186 of file memory.h.

#define ARCH_PFN_OFFSET   PHYS_PFN_OFFSET

Definition at line 273 of file memory.h.

#define END_MEM   (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)

Definition at line 106 of file memory.h.

#define MODULES_END   (END_MEM)

Definition at line 116 of file memory.h.

#define MODULES_VADDR   (PHYS_OFFSET)

Definition at line 117 of file memory.h.

#define PAGE_OFFSET   (PHYS_OFFSET)

Definition at line 110 of file memory.h.

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

Definition at line 141 of file memory.h.

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

Definition at line 233 of file memory.h.

#define PHYS_OFFSET   UL(CONFIG_DRAM_BASE)

Definition at line 102 of file memory.h.

#define PHYS_PFN_OFFSET   (PHYS_OFFSET >> PAGE_SHIFT)

Definition at line 210 of file memory.h.

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

Definition at line 142 of file memory.h.

#define TASK_SIZE   (CONFIG_DRAM_SIZE)

Definition at line 94 of file memory.h.

#define TASK_UNMAPPED_BASE   UL(0x00000000)

Definition at line 98 of file memory.h.

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

Definition at line 29 of file memory.h.

#define virt_addr_valid (   kaddr)    ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)

Definition at line 276 of file memory.h.

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

Definition at line 275 of file memory.h.

#define XIP_VIRT_ADDR (   physaddr)    (physaddr)

Definition at line 119 of file memory.h.