Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ttm_page_alloc.c File Reference
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/highmem.h>
#include <linux/mm_types.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/atomic.h>
#include <drm/ttm/ttm_bo_driver.h>
#include <drm/ttm/ttm_page_alloc.h>

Go to the source code of this file.

Data Structures

struct  ttm_page_pool
struct  ttm_pool_opts
struct  ttm_pool_manager


#define pr_fmt(fmt)   "[TTM] " fmt
#define NUM_PAGES_TO_ALLOC   (PAGE_SIZE/sizeof(struct page *))
#define FREE_ALL_PAGES   (~0U)
#define PAGE_FREE_INTERVAL   1000
#define NUM_POOLS   4


int ttm_page_alloc_init (struct ttm_mem_global *glob, unsigned max_pages)
void ttm_page_alloc_fini (void)
int ttm_pool_populate (struct ttm_tt *ttm)
 EXPORT_SYMBOL (ttm_pool_populate)
void ttm_pool_unpopulate (struct ttm_tt *ttm)
 EXPORT_SYMBOL (ttm_pool_unpopulate)
int ttm_page_alloc_debugfs (struct seq_file *m, void *data)
 EXPORT_SYMBOL (ttm_page_alloc_debugfs)

Macro Definition Documentation

#define FREE_ALL_PAGES   (~0U)

Definition at line 57 of file ttm_page_alloc.c.

#define NUM_PAGES_TO_ALLOC   (PAGE_SIZE/sizeof(struct page *))

Definition at line 55 of file ttm_page_alloc.c.

#define NUM_POOLS   4

Definition at line 95 of file ttm_page_alloc.c.

#define PAGE_FREE_INTERVAL   1000

Definition at line 59 of file ttm_page_alloc.c.

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

Definition at line 34 of file ttm_page_alloc.c.


Definition at line 56 of file ttm_page_alloc.c.

Function Documentation

EXPORT_SYMBOL ( ttm_pool_populate  )
EXPORT_SYMBOL ( ttm_pool_unpopulate  )
EXPORT_SYMBOL ( ttm_page_alloc_debugfs  )
int ttm_page_alloc_debugfs ( struct seq_file m,
void data 

Output the state of pools to debugfs file

Definition at line 899 of file ttm_page_alloc.c.

void ttm_page_alloc_fini ( void  )

Free pool allocator.

Definition at line 829 of file ttm_page_alloc.c.

int ttm_page_alloc_init ( struct ttm_mem_global glob,
unsigned  max_pages 

Initialize pool allocator.

Definition at line 792 of file ttm_page_alloc.c.

int ttm_pool_populate ( struct ttm_tt ttm)


: The struct ttm_tt to contain the backing pages.

Add backing pages to all of

Definition at line 843 of file ttm_page_alloc.c.

void ttm_pool_unpopulate ( struct ttm_tt ttm)


: The struct ttm_tt which to free backing pages.

Free all pages of

Definition at line 882 of file ttm_page_alloc.c.