| .. | .. |
|---|
| 63 | 63 | |
|---|
| 64 | 64 | #define TTM_MEM_MAX_ZONES 2 |
|---|
| 65 | 65 | struct ttm_mem_zone; |
|---|
| 66 | | -struct ttm_mem_global { |
|---|
| 66 | +extern struct ttm_mem_global { |
|---|
| 67 | 67 | struct kobject kobj; |
|---|
| 68 | | - struct ttm_bo_global *bo_glob; |
|---|
| 69 | 68 | struct workqueue_struct *swap_queue; |
|---|
| 70 | 69 | struct work_struct work; |
|---|
| 71 | 70 | spinlock_t lock; |
|---|
| .. | .. |
|---|
| 78 | 77 | #else |
|---|
| 79 | 78 | struct ttm_mem_zone *zone_dma32; |
|---|
| 80 | 79 | #endif |
|---|
| 81 | | -}; |
|---|
| 80 | +} ttm_mem_glob; |
|---|
| 82 | 81 | |
|---|
| 83 | | -extern int ttm_mem_global_init(struct ttm_mem_global *glob); |
|---|
| 84 | | -extern void ttm_mem_global_release(struct ttm_mem_global *glob); |
|---|
| 85 | | -extern int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory, |
|---|
| 82 | +int ttm_mem_global_init(struct ttm_mem_global *glob); |
|---|
| 83 | +void ttm_mem_global_release(struct ttm_mem_global *glob); |
|---|
| 84 | +int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory, |
|---|
| 85 | + struct ttm_operation_ctx *ctx); |
|---|
| 86 | +void ttm_mem_global_free(struct ttm_mem_global *glob, uint64_t amount); |
|---|
| 87 | +int ttm_mem_global_alloc_page(struct ttm_mem_global *glob, |
|---|
| 88 | + struct page *page, uint64_t size, |
|---|
| 89 | + struct ttm_operation_ctx *ctx); |
|---|
| 90 | +void ttm_mem_global_free_page(struct ttm_mem_global *glob, |
|---|
| 91 | + struct page *page, uint64_t size); |
|---|
| 92 | +size_t ttm_round_pot(size_t size); |
|---|
| 93 | +bool ttm_check_under_lowerlimit(struct ttm_mem_global *glob, uint64_t num_pages, |
|---|
| 86 | 94 | struct ttm_operation_ctx *ctx); |
|---|
| 87 | | -extern void ttm_mem_global_free(struct ttm_mem_global *glob, |
|---|
| 88 | | - uint64_t amount); |
|---|
| 89 | | -extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob, |
|---|
| 90 | | - struct page *page, uint64_t size, |
|---|
| 91 | | - struct ttm_operation_ctx *ctx); |
|---|
| 92 | | -extern void ttm_mem_global_free_page(struct ttm_mem_global *glob, |
|---|
| 93 | | - struct page *page, uint64_t size); |
|---|
| 94 | | -extern size_t ttm_round_pot(size_t size); |
|---|
| 95 | | -extern uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob); |
|---|
| 96 | | -extern bool ttm_check_under_lowerlimit(struct ttm_mem_global *glob, |
|---|
| 97 | | - uint64_t num_pages, struct ttm_operation_ctx *ctx); |
|---|
| 98 | 95 | #endif |
|---|