Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ioremap.c File Reference
#include <linux/bootmem.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/mmiotrace.h>
#include <asm/cacheflush.h>
#include <asm/e820.h>
#include <asm/fixmap.h>
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
#include <asm/pgalloc.h>
#include <asm/pat.h>
#include "physaddr.h"

Go to the source code of this file.

Macros

#define __FIXADDR_TOP   (-PAGE_SIZE)
 

Functions

int ioremap_change_attr (unsigned long vaddr, unsigned long size, unsigned long prot_val)
 
void __iomemioremap_nocache (resource_size_t phys_addr, unsigned long size)
 
 EXPORT_SYMBOL (ioremap_nocache)
 
void __iomemioremap_wc (resource_size_t phys_addr, unsigned long size)
 
 EXPORT_SYMBOL (ioremap_wc)
 
void __iomemioremap_cache (resource_size_t phys_addr, unsigned long size)
 
 EXPORT_SYMBOL (ioremap_cache)
 
void __iomemioremap_prot (resource_size_t phys_addr, unsigned long size, unsigned long prot_val)
 
 EXPORT_SYMBOL (ioremap_prot)
 
void iounmap (volatile void __iomem *addr)
 
 EXPORT_SYMBOL (iounmap)
 
voidxlate_dev_mem_ptr (unsigned long phys)
 
void unxlate_dev_mem_ptr (unsigned long phys, void *addr)
 
 early_param ("early_ioremap_debug", early_ioremap_debug_setup)
 
bool __init is_early_ioremap_ptep (pte_t *ptep)
 
void __init early_ioremap_init (void)
 
void __init early_ioremap_reset (void)
 
void __init fixup_early_ioremap (void)
 
 late_initcall (check_early_ioremap_leak)
 
void __init __iomemearly_ioremap (resource_size_t phys_addr, unsigned long size)
 
void __init __iomemearly_memremap (resource_size_t phys_addr, unsigned long size)
 
void __init early_iounmap (void __iomem *addr, unsigned long size)
 

Macro Definition Documentation

#define __FIXADDR_TOP   (-PAGE_SIZE)

Function Documentation

void __init __iomem* early_ioremap ( resource_size_t  phys_addr,
unsigned long  size 
)

Definition at line 565 of file ioremap.c.

void __init early_ioremap_init ( void  )

Definition at line 372 of file ioremap.c.

void __init early_ioremap_reset ( void  )

Definition at line 410 of file ioremap.c.

void __init early_iounmap ( void __iomem addr,
unsigned long  size 
)

Definition at line 577 of file ioremap.c.

void __init __iomem* early_memremap ( resource_size_t  phys_addr,
unsigned long  size 
)

Definition at line 572 of file ioremap.c.

early_param ( "early_ioremap_debug"  ,
early_ioremap_debug_setup   
)
EXPORT_SYMBOL ( ioremap_nocache  )
EXPORT_SYMBOL ( ioremap_wc  )
EXPORT_SYMBOL ( ioremap_cache  )
EXPORT_SYMBOL ( ioremap_prot  )
EXPORT_SYMBOL ( iounmap  )
void __init fixup_early_ioremap ( void  )

Definition at line 454 of file ioremap.c.

void __iomem* ioremap_cache ( resource_size_t  phys_addr,
unsigned long  size 
)

Definition at line 238 of file ioremap.c.

int ioremap_change_attr ( unsigned long  vaddr,
unsigned long  size,
unsigned long  prot_val 
)

Definition at line 31 of file ioremap.c.

void __iomem* ioremap_nocache ( resource_size_t  phys_addr,
unsigned long  size 
)

ioremap_nocache - map bus memory into CPU space : bus address of the memory : size of the resource to map

ioremap_nocache performs a platform specific sequence of operations to make bus memory CPU accessible via the readb/readw/readl/writeb/ writew/writel functions and the other mmio helpers. The returned address is not guaranteed to be usable directly as a virtual address.

This version of ioremap ensures that the memory is marked uncachable on the CPU as well as honouring existing caching rules from things like the PCI bus. Note that there are other caches and buffers on many busses. In particular driver authors should read up on PCI writes

It's useful if some control registers are in such an area and write combining or read caching is not desirable:

Must be freed with iounmap.

Definition at line 202 of file ioremap.c.

void __iomem* ioremap_prot ( resource_size_t  phys_addr,
unsigned long  size,
unsigned long  prot_val 
)

Definition at line 245 of file ioremap.c.

void __iomem* ioremap_wc ( resource_size_t  phys_addr,
unsigned long  size 
)

ioremap_wc - map memory into CPU space write combined : bus address of the memory : size of the resource to map

This version of ioremap ensures that the memory is marked write combining. Write combining allows faster writes to some hardware devices.

Must be freed with iounmap.

Definition at line 228 of file ioremap.c.

void iounmap ( volatile void __iomem addr)

iounmap - Free a IO remapping : virtual address from ioremap_*

Caller must ensure there is only one unmapping for the same pointer.

Definition at line 259 of file ioremap.c.

bool __init is_early_ioremap_ptep ( pte_t ptep)

Definition at line 365 of file ioremap.c.

late_initcall ( check_early_ioremap_leak  )
void unxlate_dev_mem_ptr ( unsigned long  phys,
void addr 
)

Definition at line 327 of file ioremap.c.

void* xlate_dev_mem_ptr ( unsigned long  phys)

Definition at line 311 of file ioremap.c.