Lines Matching full:elements
29 int orig_cpu = cp->elements[idx].cpu; in cpudl_heapify_down()
30 u64 orig_dl = cp->elements[idx].dl; in cpudl_heapify_down()
45 cp->elements[l].dl)) { in cpudl_heapify_down()
47 largest_dl = cp->elements[l].dl; in cpudl_heapify_down()
50 cp->elements[r].dl)) in cpudl_heapify_down()
57 cp->elements[idx].cpu = cp->elements[largest].cpu; in cpudl_heapify_down()
58 cp->elements[idx].dl = cp->elements[largest].dl; in cpudl_heapify_down()
59 cp->elements[cp->elements[idx].cpu].idx = idx; in cpudl_heapify_down()
63 cp->elements[idx].cpu = orig_cpu; in cpudl_heapify_down()
64 cp->elements[idx].dl = orig_dl; in cpudl_heapify_down()
65 cp->elements[cp->elements[idx].cpu].idx = idx; in cpudl_heapify_down()
72 int orig_cpu = cp->elements[idx].cpu; in cpudl_heapify_up()
73 u64 orig_dl = cp->elements[idx].dl; in cpudl_heapify_up()
80 if (dl_time_before(orig_dl, cp->elements[p].dl)) in cpudl_heapify_up()
83 cp->elements[idx].cpu = cp->elements[p].cpu; in cpudl_heapify_up()
84 cp->elements[idx].dl = cp->elements[p].dl; in cpudl_heapify_up()
85 cp->elements[cp->elements[idx].cpu].idx = idx; in cpudl_heapify_up()
89 cp->elements[idx].cpu = orig_cpu; in cpudl_heapify_up()
90 cp->elements[idx].dl = orig_dl; in cpudl_heapify_up()
91 cp->elements[cp->elements[idx].cpu].idx = idx; in cpudl_heapify_up()
96 if (idx > 0 && dl_time_before(cp->elements[parent(idx)].dl, in cpudl_heapify()
97 cp->elements[idx].dl)) in cpudl_heapify()
105 return cp->elements[0].cpu; in cpudl_maximum()
154 dl_time_before(dl_se->deadline, cp->elements[0].dl)) { in cpudl_find()
182 old_idx = cp->elements[cpu].idx; in cpudl_clear()
190 new_cpu = cp->elements[cp->size - 1].cpu; in cpudl_clear()
191 cp->elements[old_idx].dl = cp->elements[cp->size - 1].dl; in cpudl_clear()
192 cp->elements[old_idx].cpu = new_cpu; in cpudl_clear()
194 cp->elements[new_cpu].idx = old_idx; in cpudl_clear()
195 cp->elements[cpu].idx = IDX_INVALID; in cpudl_clear()
222 old_idx = cp->elements[cpu].idx; in cpudl_set()
226 cp->elements[new_idx].dl = dl; in cpudl_set()
227 cp->elements[new_idx].cpu = cpu; in cpudl_set()
228 cp->elements[cpu].idx = new_idx; in cpudl_set()
232 cp->elements[old_idx].dl = dl; in cpudl_set()
270 cp->elements = kcalloc(nr_cpu_ids, in cpudl_init()
273 if (!cp->elements) in cpudl_init()
277 kfree(cp->elements); in cpudl_init()
282 cp->elements[i].idx = IDX_INVALID; in cpudl_init()
294 kfree(cp->elements); in cpudl_cleanup()