• Home
  • Raw
  • Download

Lines Matching full:order

160 STATIC VOID OsVmPhysFreeListAddUnsafe(LosVmPage *page, UINT8 order)  in OsVmPhysFreeListAddUnsafe()  argument
169 page->order = order; in OsVmPhysFreeListAddUnsafe()
172 list = &seg->freeList[order]; in OsVmPhysFreeListAddUnsafe()
182 if ((page->segID >= VM_PHYS_SEG_MAX) || (page->order >= VM_LIST_ORDER_MAX)) { in OsVmPhysFreeListDelUnsafe()
183 LOS_Panic("The page segment id(%u) or order(%u) is invalid\n", page->segID, page->order); in OsVmPhysFreeListDelUnsafe()
187 list = &seg->freeList[page->order]; in OsVmPhysFreeListDelUnsafe()
190 page->order = VM_LIST_ORDER_MAX; in OsVmPhysFreeListDelUnsafe()
195 UINT32 order; in OsVmPhysPagesSpiltUnsafe() local
198 for (order = newOrder; order > oldOrder;) { in OsVmPhysPagesSpiltUnsafe()
199 order--; in OsVmPhysPagesSpiltUnsafe()
200 buddyPage = &page[VM_ORDER_TO_PAGES(order)]; in OsVmPhysPagesSpiltUnsafe()
201 LOS_ASSERT(buddyPage->order == VM_LIST_ORDER_MAX); in OsVmPhysPagesSpiltUnsafe()
202 OsVmPhysFreeListAddUnsafe(buddyPage, order); in OsVmPhysPagesSpiltUnsafe()
294 if (tmp->order != (VM_LIST_ORDER_MAX - 1)) { in OsVmPhysLargeAlloc()
311 UINT32 order; in OsVmPhysPagesAlloc() local
314 order = OsVmPagesToOrder(nPages); in OsVmPhysPagesAlloc()
315 if (order < VM_LIST_ORDER_MAX) { in OsVmPhysPagesAlloc()
316 for (newOrder = order; newOrder < VM_LIST_ORDER_MAX; newOrder++) { in OsVmPhysPagesAlloc()
337 OsVmPhysPagesSpiltUnsafe(page, order, newOrder); in OsVmPhysPagesAlloc()
338 OsVmRecycleExtraPages(&page[nPages], nPages, ROUNDUP(nPages, (1 << min(order, newOrder)))); in OsVmPhysPagesAlloc()
343 VOID OsVmPhysPagesFree(LosVmPage *page, UINT8 order) in OsVmPhysPagesFree() argument
348 if ((page == NULL) || (order >= VM_LIST_ORDER_MAX)) { in OsVmPhysPagesFree()
352 if (order < VM_LIST_ORDER_MAX - 1) { in OsVmPhysPagesFree()
355 pa ^= VM_ORDER_TO_PHYS(order); in OsVmPhysPagesFree()
357 if ((buddyPage == NULL) || (buddyPage->order != order)) { in OsVmPhysPagesFree()
361 order++; in OsVmPhysPagesFree()
362 pa &= ~(VM_ORDER_TO_PHYS(order) - 1); in OsVmPhysPagesFree()
364 } while (order < VM_LIST_ORDER_MAX - 1); in OsVmPhysPagesFree()
367 OsVmPhysFreeListAddUnsafe(page, order); in OsVmPhysPagesFree()
373 UINT32 order; in OsVmPhysPagesFreeContiguous() local
378 order = VM_PHYS_TO_ORDER(pa); in OsVmPhysPagesFreeContiguous()
379 n = VM_ORDER_TO_PAGES(order); in OsVmPhysPagesFreeContiguous()
383 OsVmPhysPagesFree(page, order); in OsVmPhysPagesFreeContiguous()
389 order = LOS_HighBitGet(nPages); in OsVmPhysPagesFreeContiguous()
390 n = VM_ORDER_TO_PAGES(order); in OsVmPhysPagesFreeContiguous()
391 OsVmPhysPagesFree(page, order); in OsVmPhysPagesFreeContiguous()
586 UINT32 order; in OsVmPagesToOrder() local
588 for (order = 0; VM_ORDER_TO_PAGES(order) < nPages; order++); in OsVmPagesToOrder()
590 return order; in OsVmPagesToOrder()