• Home
  • Raw
  • Download

Lines Matching refs:nareas

128 static void swiotlb_adjust_nareas(unsigned int nareas)  in swiotlb_adjust_nareas()  argument
130 if (!nareas) in swiotlb_adjust_nareas()
131 nareas = 1; in swiotlb_adjust_nareas()
132 else if (!is_power_of_2(nareas)) in swiotlb_adjust_nareas()
133 nareas = roundup_pow_of_two(nareas); in swiotlb_adjust_nareas()
135 default_nareas = nareas; in swiotlb_adjust_nareas()
137 pr_info("area num %d.\n", nareas); in swiotlb_adjust_nareas()
153 static unsigned int limit_nareas(unsigned int nareas, unsigned long nslots) in limit_nareas() argument
155 if (nslots < nareas * IO_TLB_SEGSIZE) in limit_nareas()
157 return nareas; in limit_nareas()
289 bool late_alloc, unsigned int nareas) in swiotlb_init_io_tlb_mem() argument
298 mem->nareas = nareas; in swiotlb_init_io_tlb_mem()
299 mem->area_nslabs = nslabs / mem->nareas; in swiotlb_init_io_tlb_mem()
303 for (i = 0; i < mem->nareas; i++) { in swiotlb_init_io_tlb_mem()
368 unsigned int nareas; in swiotlb_init_remap() local
381 nareas = limit_nareas(default_nareas, nslabs); in swiotlb_init_remap()
386 nareas = limit_nareas(nareas, nslabs); in swiotlb_init_remap()
432 unsigned int nareas; in swiotlb_init_late() local
478 nareas = limit_nareas(default_nareas, nslabs); in swiotlb_init_late()
479 area_order = get_order(array_size(sizeof(*mem->areas), nareas)); in swiotlb_init_late()
493 nareas); in swiotlb_init_late()
526 mem->nareas)); in swiotlb_exit()
532 array_size(sizeof(*mem->areas), mem->nareas)); in swiotlb_exit()
667 BUG_ON(area_index >= mem->nareas); in swiotlb_do_find_slots()
741 int start = raw_smp_processor_id() & (mem->nareas - 1); in swiotlb_find_slots()
749 if (++i >= mem->nareas) in swiotlb_find_slots()
761 for (i = 0; i < mem->nareas; i++) in mem_used()
838 BUG_ON(aindex >= mem->nareas); in swiotlb_release_slots()
1030 unsigned int nareas = 1; in rmem_swiotlb_device_init() local
1053 mem->areas = kcalloc(nareas, sizeof(*mem->areas), in rmem_swiotlb_device_init()
1064 false, nareas); in rmem_swiotlb_device_init()