Lines Matching refs:tmp_slab_obj

130     struct slab_obj *tmp_slab_obj = NULL;  in slab_destroy()  local
133 tmp_slab_obj = slab_obj_ptr; in slab_destroy()
137 list_del(&tmp_slab_obj->list); in slab_destroy()
139 kfree(tmp_slab_obj->bmp); in slab_destroy()
141 page_clean(tmp_slab_obj->page); in slab_destroy()
143 free_pages(tmp_slab_obj->page, 1); in slab_destroy()
145 kfree(tmp_slab_obj); in slab_destroy()
166 struct slab_obj *tmp_slab_obj = NULL; in slab_malloc() local
171 tmp_slab_obj = (struct slab_obj *)kmalloc(sizeof(struct slab_obj), 0); in slab_malloc()
174 if (tmp_slab_obj == NULL) in slab_malloc()
180 memset(tmp_slab_obj, 0, sizeof(struct slab_obj)); in slab_malloc()
181 list_init(&tmp_slab_obj->list); in slab_malloc()
183 tmp_slab_obj->page = alloc_pages(ZONE_NORMAL, 1, PAGE_KERNEL); in slab_malloc()
186 if (tmp_slab_obj->page == NULL) in slab_malloc()
189 kfree(tmp_slab_obj); in slab_malloc()
193 tmp_slab_obj->count_using = 0; in slab_malloc()
194 tmp_slab_obj->count_free = PAGE_2M_SIZE / slab_pool->size; in slab_malloc()
195 tmp_slab_obj->vaddr = phys_2_virt(tmp_slab_obj->page->addr_phys); in slab_malloc()
196 tmp_slab_obj->bmp_count = tmp_slab_obj->count_free; in slab_malloc()
198 tmp_slab_obj->bmp_len = ((tmp_slab_obj->bmp_count + sizeof(ul) * 8 - 1) >> 6) << 3; in slab_malloc()
199 tmp_slab_obj->bmp = (ul *)kmalloc(tmp_slab_obj->bmp_len, 0); in slab_malloc()
202 if (tmp_slab_obj->bmp == NULL) in slab_malloc()
205 free_pages(tmp_slab_obj->page, 1); in slab_malloc()
206 kfree(tmp_slab_obj); in slab_malloc()
210 memset(tmp_slab_obj->bmp, 0, tmp_slab_obj->bmp_len); in slab_malloc()
212 list_add(&slab_pool->cache_pool_entry->list, &tmp_slab_obj->list); in slab_malloc()
214 slab_pool->count_total_free += tmp_slab_obj->count_free; in slab_malloc()
216 slab_obj_ptr = tmp_slab_obj; in slab_malloc()
270 if (tmp_slab_obj != NULL) in slab_malloc()
272 list_del(&tmp_slab_obj->list); in slab_malloc()
273 kfree(tmp_slab_obj->bmp); in slab_malloc()
274 page_clean(tmp_slab_obj->page); in slab_malloc()
275 free_pages(tmp_slab_obj->page, 1); in slab_malloc()
276 kfree(tmp_slab_obj); in slab_malloc()