Lines Matching refs:cache_pool_entry
50 slab_pool->cache_pool_entry = (struct slab_obj *)kmalloc(sizeof(struct slab_obj), 0); in slab_create()
53 if (slab_pool->cache_pool_entry == NULL) in slab_create()
59 memset(slab_pool->cache_pool_entry, 0, sizeof(struct slab_obj)); in slab_create()
68 list_init(&slab_pool->cache_pool_entry->list); in slab_create()
71 slab_pool->cache_pool_entry->page = alloc_pages(ZONE_NORMAL, 1, PAGE_KERNEL); in slab_create()
74 if (slab_pool->cache_pool_entry->page == NULL) in slab_create()
77 kfree(slab_pool->cache_pool_entry); in slab_create()
84 slab_pool->cache_pool_entry->count_using = 0; in slab_create()
85 slab_pool->cache_pool_entry->count_free = PAGE_2M_SIZE / slab_pool->size; in slab_create()
87 slab_pool->count_total_free = slab_pool->cache_pool_entry->count_free; in slab_create()
89 slab_pool->cache_pool_entry->vaddr = phys_2_virt(slab_pool->cache_pool_entry->page->addr_phys); in slab_create()
92 slab_pool->cache_pool_entry->bmp_count = slab_pool->cache_pool_entry->count_free; in slab_create()
95 …slab_pool->cache_pool_entry->bmp_len = ((slab_pool->cache_pool_entry->bmp_count + sizeof(ul) * 8 -… in slab_create()
97 slab_pool->cache_pool_entry->bmp = (ul *)kmalloc(slab_pool->cache_pool_entry->bmp_len, 0); in slab_create()
100 if (slab_pool->cache_pool_entry->bmp == NULL) in slab_create()
103 free_pages(slab_pool->cache_pool_entry->page, 1); in slab_create()
104 kfree(slab_pool->cache_pool_entry); in slab_create()
109 memset(slab_pool->cache_pool_entry->bmp, 0, slab_pool->cache_pool_entry->bmp_len); in slab_create()
123 struct slab_obj *slab_obj_ptr = slab_pool->cache_pool_entry; in slab_destroy()
165 struct slab_obj *slab_obj_ptr = slab_pool->cache_pool_entry; in slab_malloc()
212 list_add(&slab_pool->cache_pool_entry->list, &tmp_slab_obj->list); in slab_malloc()
263 } while (slab_obj_ptr != slab_pool->cache_pool_entry); in slab_malloc()
291 struct slab_obj *slab_obj_ptr = slab_pool->cache_pool_entry; in slab_free()
320 …unt_total_free >> 1) >= slab_obj_ptr->count_free) && (slab_obj_ptr != slab_pool->cache_pool_entry)) in slab_free()
335 } while (slab_obj_ptr != slab_pool->cache_pool_entry); in slab_free()
356 …kmalloc_cache_group[i].cache_pool_entry = (struct slab_obj *)memory_management_struct.end_of_struc… in slab_init()
360 list_init(&kmalloc_cache_group[i].cache_pool_entry->list); in slab_init()
363 kmalloc_cache_group[i].cache_pool_entry->count_using = 0; in slab_init()
364 … kmalloc_cache_group[i].cache_pool_entry->count_free = PAGE_2M_SIZE / kmalloc_cache_group[i].size; in slab_init()
365 …kmalloc_cache_group[i].cache_pool_entry->bmp_len = (((kmalloc_cache_group[i].cache_pool_entry->cou… in slab_init()
366 …kmalloc_cache_group[i].cache_pool_entry->bmp_count = kmalloc_cache_group[i].cache_pool_entry->coun… in slab_init()
369 kmalloc_cache_group[i].cache_pool_entry->bmp = (ul *)memory_management_struct.end_of_struct; in slab_init()
372 …ul)(memory_management_struct.end_of_struct + kmalloc_cache_group[i].cache_pool_entry->bmp_len + (s… in slab_init()
375 …memset(kmalloc_cache_group[i].cache_pool_entry->bmp, 0xff, kmalloc_cache_group[i].cache_pool_entry… in slab_init()
376 for (int j = 0; j < kmalloc_cache_group[i].cache_pool_entry->bmp_count; ++j) in slab_init()
377 *(kmalloc_cache_group[i].cache_pool_entry->bmp + (j >> 6)) ^= 1UL << (j % 64); in slab_init()
380 … kmalloc_cache_group[i].count_total_free = kmalloc_cache_group[i].cache_pool_entry->count_free; in slab_init()
421 kmalloc_cache_group[i].cache_pool_entry->page = page; in slab_init()
423 kmalloc_cache_group[i].cache_pool_entry->vaddr = virt; in slab_init()
560 struct slab_obj *slab_obj_ptr = kmalloc_cache_group[index].cache_pool_entry; in kmalloc()
576 list_add(&kmalloc_cache_group[index].cache_pool_entry->list, &slab_obj_ptr->list); in kmalloc()
587 } while (slab_obj_ptr != kmalloc_cache_group[index].cache_pool_entry); in kmalloc()
647 slab_obj_ptr = kmalloc_cache_group[i].cache_pool_entry; in kfree()
673 …ree >= ((slab_obj_ptr->bmp_count) << 1)) && (kmalloc_cache_group[i].cache_pool_entry != slab_obj_p… in kfree()
709 } while (slab_obj_ptr != kmalloc_cache_group[i].cache_pool_entry); in kfree()