Lines Matching full:areas

125  * otherwise a segment may span two or more areas. It conflicts with free
145 * swiotlb_adjust_nareas() - adjust the number of areas and slots
146 * @nareas: Desired number of areas. Zero is treated as 1.
148 * Adjust the default number of areas in a memory pool.
168 * limit_nareas() - get the maximum number of areas for a given memory pool size
169 * @nareas: Desired number of areas.
172 * Limit the number of areas to the maximum possible number of areas in
175 * Return: Maximum possible number of areas.
283 spin_lock_init(&mem->areas[i].lock); in swiotlb_init_io_tlb_pool()
284 mem->areas[i].index = 0; in swiotlb_init_io_tlb_pool()
285 mem->areas[i].used = 0; in swiotlb_init_io_tlb_pool()
406 mem->areas = memblock_alloc(array_size(sizeof(struct io_tlb_area), in swiotlb_init_remap()
408 if (!mem->areas) { in swiotlb_init_remap()
409 pr_warn("%s: Failed to allocate mem->areas.\n", __func__); in swiotlb_init_remap()
498 area_order = get_order(array_size(sizeof(*mem->areas), nareas)); in swiotlb_init_late()
499 mem->areas = (struct io_tlb_area *) in swiotlb_init_late()
501 if (!mem->areas) in swiotlb_init_late()
519 free_pages((unsigned long)mem->areas, area_order); in swiotlb_init_late()
545 area_order = get_order(array_size(sizeof(*mem->areas), in swiotlb_exit()
547 free_pages((unsigned long)mem->areas, area_order); in swiotlb_exit()
551 memblock_free_late(__pa(mem->areas), in swiotlb_exit()
552 array_size(sizeof(*mem->areas), mem->nareas)); in swiotlb_exit()
673 * @nareas: Number of areas.
698 pool_size = sizeof(*pool) + array_size(sizeof(*pool->areas), nareas); in swiotlb_alloc_pool()
702 pool->areas = (void *)pool + sizeof(*pool); in swiotlb_alloc_pool()
948 * multiple areas.
1020 struct io_tlb_area *area = pool->areas + area_index; in swiotlb_search_pool_area()
1312 used += pool->areas[i].used; in mem_pool_used()
1321 * areas.
1456 area = &mem->areas[aindex]; in swiotlb_release_slots()
1825 pool->areas = kcalloc(nareas, sizeof(*pool->areas), in rmem_swiotlb_device_init()
1827 if (!pool->areas) { in rmem_swiotlb_device_init()