Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ttm_memory.c File Reference
#include <drm/ttm/ttm_memory.h>
#include <drm/ttm/ttm_module.h>
#include <drm/ttm/ttm_page_alloc.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  ttm_mem_zone
 

Macros

#define pr_fmt(fmt)   "[TTM] " fmt
 
#define TTM_MEMORY_ALLOC_RETRIES   4
 

Functions

int ttm_mem_global_init (struct ttm_mem_global *glob)
 
 EXPORT_SYMBOL (ttm_mem_global_init)
 
void ttm_mem_global_release (struct ttm_mem_global *glob)
 
 EXPORT_SYMBOL (ttm_mem_global_release)
 
void ttm_mem_global_free (struct ttm_mem_global *glob, uint64_t amount)
 
 EXPORT_SYMBOL (ttm_mem_global_free)
 
int ttm_mem_global_alloc (struct ttm_mem_global *glob, uint64_t memory, bool no_wait, bool interruptible)
 
 EXPORT_SYMBOL (ttm_mem_global_alloc)
 
int ttm_mem_global_alloc_page (struct ttm_mem_global *glob, struct page *page, bool no_wait, bool interruptible)
 
void ttm_mem_global_free_page (struct ttm_mem_global *glob, struct page *page)
 
size_t ttm_round_pot (size_t size)
 
 EXPORT_SYMBOL (ttm_round_pot)
 

Macro Definition Documentation

#define pr_fmt (   fmt)    "[TTM] " fmt

Definition at line 28 of file ttm_memory.c.

#define TTM_MEMORY_ALLOC_RETRIES   4

Definition at line 40 of file ttm_memory.c.

Function Documentation

EXPORT_SYMBOL ( ttm_mem_global_init  )
EXPORT_SYMBOL ( ttm_mem_global_release  )
EXPORT_SYMBOL ( ttm_mem_global_free  )
EXPORT_SYMBOL ( ttm_mem_global_alloc  )
EXPORT_SYMBOL ( ttm_round_pot  )
int ttm_mem_global_alloc ( struct ttm_mem_global glob,
uint64_t  memory,
bool  no_wait,
bool  interruptible 
)

Normal allocations of kernel memory are registered in all zones.

Definition at line 535 of file ttm_memory.c.

int ttm_mem_global_alloc_page ( struct ttm_mem_global glob,
struct page page,
bool  no_wait,
bool  interruptible 
)

Page allocations may be registed in a single zone only if highmem or !dma32.

Definition at line 548 of file ttm_memory.c.

void ttm_mem_global_free ( struct ttm_mem_global glob,
uint64_t  amount 
)

Definition at line 467 of file ttm_memory.c.

void ttm_mem_global_free_page ( struct ttm_mem_global glob,
struct page page 
)

Definition at line 571 of file ttm_memory.c.

int ttm_mem_global_init ( struct ttm_mem_global glob)

Definition at line 360 of file ttm_memory.c.

void ttm_mem_global_release ( struct ttm_mem_global glob)

Definition at line 406 of file ttm_memory.c.

size_t ttm_round_pot ( size_t  size)

Definition at line 586 of file ttm_memory.c.