Lines Matching refs:claimed

580 static void vof_claimed_dump(GArray *claimed)  in vof_claimed_dump()  argument
588 for (i = 0; i < claimed->len; ++i) { in vof_claimed_dump()
589 c = g_array_index(claimed, OfClaimed, i); in vof_claimed_dump()
595 static bool vof_claim_avail(GArray *claimed, uint64_t virt, uint64_t size) in vof_claim_avail() argument
600 for (i = 0; i < claimed->len; ++i) { in vof_claim_avail()
601 c = g_array_index(claimed, OfClaimed, i); in vof_claim_avail()
610 static void vof_claim_add(GArray *claimed, uint64_t virt, uint64_t size) in vof_claim_add() argument
616 g_array_append_val(claimed, newclaim); in vof_claim_add()
624 static void vof_dt_memory_available(void *fdt, GArray *claimed, uint64_t base) in vof_dt_memory_available() argument
632 if (!fdt || !claimed) { in vof_dt_memory_available()
654 g_array_sort(claimed, of_claimed_compare_func); in vof_dt_memory_available()
655 vof_claimed_dump(claimed); in vof_dt_memory_available()
661 g_assert(claimed->len && (g_array_index(claimed, OfClaimed, 0).start == 0)); in vof_dt_memory_available()
663 avail = g_malloc0(sizeof(uint32_t) * (ac + sc) * claimed->len); in vof_dt_memory_available()
664 for (i = 0, n = 0, availcur = avail; i < claimed->len; ++i) { in vof_dt_memory_available()
665 OfClaimed c = g_array_index(claimed, OfClaimed, i); in vof_dt_memory_available()
669 if (i < claimed->len - 1) { in vof_dt_memory_available()
670 OfClaimed cn = g_array_index(claimed, OfClaimed, i + 1); in vof_dt_memory_available()
714 if (!vof_claim_avail(vof->claimed, virt, size)) { in vof_claim()
726 if (vof_claim_avail(vof->claimed, vof->claimed_base, size)) { in vof_claim()
736 vof_claim_add(vof->claimed, ret, size); in vof_claim()
747 GArray *claimed = vof->claimed; in vof_release() local
750 for (i = 0; i < claimed->len; ++i) { in vof_release()
751 c = g_array_index(claimed, OfClaimed, i); in vof_release()
753 g_array_remove_index(claimed, i); in vof_release()
851 vof_claimed_dump(vof->claimed); in vof_quiesce()
897 vof_dt_memory_available(fdt, vof->claimed, vof->claimed_base); in vof_client_handle()
908 vof_dt_memory_available(fdt, vof->claimed, vof->claimed_base); in vof_client_handle()
1008 vof->claimed = g_array_new(false, false, sizeof(OfClaimed)); in vof_init()
1019 if (vof->claimed) { in vof_cleanup()
1020 g_array_unref(vof->claimed); in vof_cleanup()
1025 vof->claimed = NULL; in vof_cleanup()
1049 vof_dt_memory_available(fdt, vof->claimed, vof->claimed_base); in vof_build_dt()