Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
mm.c File Reference
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/memblock.h>
#include <linux/slab.h>
#include <asm/cell-regs.h>
#include <asm/firmware.h>
#include <asm/prom.h>
#include <asm/udbg.h>
#include <asm/lv1call.h>
#include <asm/setup.h>
#include "platform.h"

Go to the source code of this file.

Data Structures

struct  mem_region
 
struct  map
 
struct  dma_chunk
 

Macros

#define DBG   pr_devel
 
#define debug_dump_map(x)   _debug_dump_map(x, __func__, __LINE__)
 
#define dma_dump_region(_a)   _dma_dump_region(_a, __func__, __LINE__)
 
#define dma_dump_chunk(_a)   _dma_dump_chunk(_a, __func__, __LINE__)
 

Enumerations

enum  { USE_DYNAMIC_DMA = 0 }
 
enum  { PAGE_SHIFT_4K = 12U, PAGE_SHIFT_64K = 16U, PAGE_SHIFT_16M = 24U }
 
enum  { ALLOCATE_MEMORY_TRY_ALT_UNIT = 0X04, ALLOCATE_MEMORY_ADDR_ZERO = 0X08 }
 
enum  { HTAB_SIZE_MAX = 20U, HTAB_SIZE_MIN = 18U }
 

Functions

unsigned long ps3_mm_phys_to_lpar (unsigned long phys_addr)
 
 EXPORT_SYMBOL (ps3_mm_phys_to_lpar)
 
void __init ps3_mm_vas_create (unsigned long *htab_size)
 
void ps3_mm_vas_destroy (void)
 
int ps3_dma_region_init (struct ps3_system_bus_device *dev, struct ps3_dma_region *r, enum ps3_dma_page_size page_size, enum ps3_dma_region_type region_type, void *addr, unsigned long len)
 
 EXPORT_SYMBOL (ps3_dma_region_init)
 
int ps3_dma_region_create (struct ps3_dma_region *r)
 
 EXPORT_SYMBOL (ps3_dma_region_create)
 
int ps3_dma_region_free (struct ps3_dma_region *r)
 
 EXPORT_SYMBOL (ps3_dma_region_free)
 
int ps3_dma_map (struct ps3_dma_region *r, unsigned long virt_addr, unsigned long len, dma_addr_t *bus_addr, u64 iopte_flag)
 
int ps3_dma_unmap (struct ps3_dma_region *r, dma_addr_t bus_addr, unsigned long len)
 
void __init ps3_mm_init (void)
 
void ps3_mm_shutdown (void)
 

Macro Definition Documentation

#define DBG   pr_devel

Definition at line 38 of file mm.c.

#define debug_dump_map (   x)    _debug_dump_map(x, __func__, __LINE__)

Definition at line 117 of file mm.c.

#define dma_dump_chunk (   _a)    _dma_dump_chunk(_a, __func__, __LINE__)

Definition at line 381 of file mm.c.

#define dma_dump_region (   _a)    _dma_dump_region(_a, __func__, __LINE__)

Definition at line 346 of file mm.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
USE_DYNAMIC_DMA 

Definition at line 41 of file mm.c.

anonymous enum
Enumerator:
PAGE_SHIFT_4K 
PAGE_SHIFT_64K 
PAGE_SHIFT_16M 

Definition at line 49 of file mm.c.

anonymous enum
Enumerator:
ALLOCATE_MEMORY_TRY_ALT_UNIT 
ALLOCATE_MEMORY_ADDR_ZERO 

Definition at line 60 of file mm.c.

anonymous enum
Enumerator:
HTAB_SIZE_MAX 
HTAB_SIZE_MIN 

Definition at line 67 of file mm.c.

Function Documentation

EXPORT_SYMBOL ( ps3_mm_phys_to_lpar  )
EXPORT_SYMBOL ( ps3_dma_region_init  )
EXPORT_SYMBOL ( ps3_dma_region_create  )
EXPORT_SYMBOL ( ps3_dma_region_free  )
int ps3_dma_map ( struct ps3_dma_region r,
unsigned long  virt_addr,
unsigned long  len,
dma_addr_t bus_addr,
u64  iopte_flag 
)

Definition at line 1170 of file mm.c.

int ps3_dma_region_create ( struct ps3_dma_region r)

Definition at line 1152 of file mm.c.

int ps3_dma_region_free ( struct ps3_dma_region r)

Definition at line 1161 of file mm.c.

int ps3_dma_region_init ( struct ps3_system_bus_device dev,
struct ps3_dma_region r,
enum ps3_dma_page_size  page_size,
enum ps3_dma_region_type  region_type,
void addr,
unsigned long  len 
)

Definition at line 1119 of file mm.c.

int ps3_dma_unmap ( struct ps3_dma_region r,
dma_addr_t  bus_addr,
unsigned long  len 
)

Definition at line 1177 of file mm.c.

void __init ps3_mm_init ( void  )

ps3_mm_init - initialize the address space state variables

Definition at line 1191 of file mm.c.

unsigned long ps3_mm_phys_to_lpar ( unsigned long  phys_addr)

ps3_mm_phys_to_lpar - translate a linux physical address to lpar address : linux physical address

Definition at line 137 of file mm.c.

void ps3_mm_shutdown ( void  )

ps3_mm_shutdown - final cleanup of address space

Definition at line 1235 of file mm.c.

void __init ps3_mm_vas_create ( unsigned long htab_size)

ps3_mm_vas_create - create the virtual address space

Definition at line 150 of file mm.c.

void ps3_mm_vas_destroy ( void  )

ps3_mm_vas_destroy -

Definition at line 211 of file mm.c.