Lines Matching defs:ca

195 chain_init(struct chain_allocator *ca, gfp_t gfp_mask, int safe_needed)
197 ca->chain = NULL;
198 ca->used_space = LINKED_PAGE_DATA_SIZE;
199 ca->gfp_mask = gfp_mask;
200 ca->safe_needed = safe_needed;
203 static void *chain_alloc(struct chain_allocator *ca, unsigned int size)
207 if (LINKED_PAGE_DATA_SIZE - ca->used_space < size) {
210 lp = get_image_page(ca->gfp_mask, ca->safe_needed);
214 lp->next = ca->chain;
215 ca->chain = lp;
216 ca->used_space = 0;
218 ret = ca->chain->data + ca->used_space;
219 ca->used_space += size;
331 struct chain_allocator *ca,
336 node = chain_alloc(ca, sizeof(struct rtree_node));
357 int safe_needed, struct chain_allocator *ca)
374 node = alloc_rtree_node(gfp_mask, safe_needed, ca,
385 block = alloc_rtree_node(gfp_mask, safe_needed, ca, &zone->leaves);
397 node = alloc_rtree_node(gfp_mask, safe_needed, ca,
428 struct chain_allocator *ca,
436 zone = chain_alloc(ca, sizeof(struct mem_zone_bm_rtree));
447 if (add_rtree_block(zone, gfp_mask, safe_needed, ca)) {
572 struct chain_allocator ca;
577 chain_init(&ca, gfp_mask, safe_needed);
587 zone = create_zone_bm_rtree(gfp_mask, safe_needed, &ca,
596 bm->p_list = ca.chain;
603 bm->p_list = ca.chain;
2239 get_highmem_page_buffer(struct page *page, struct chain_allocator *ca)
2254 pbe = chain_alloc(ca, sizeof(struct highmem_pbe));
2324 get_highmem_page_buffer(struct page *page, struct chain_allocator *ca)
2434 static void *get_buffer(struct memory_bitmap *bm, struct chain_allocator *ca)
2445 return get_highmem_page_buffer(page, ca);
2456 pbe = chain_alloc(ca, sizeof(struct pbe));
2488 static struct chain_allocator ca;
2530 chain_init(&ca, GFP_ATOMIC, PG_SAFE);
2533 handle->buffer = get_buffer(&orig_bm, &ca);
2542 handle->buffer = get_buffer(&orig_bm, &ca);