Searched refs:heap (Results 1 - 25 of 64) sorted by relevance

123

/linux-master/include/linux/
H A Dmin_heap.h10 * struct min_heap - Data structure to hold a min-heap.
11 * @data: Start of array holding the heap elements.
12 * @nr: Number of elements currently in the heap.
24 * @less: Partial order function for this heap.
33 /* Sift the element at pos down the heap. */
35 void min_heapify(struct min_heap *heap, int pos, argument
39 void *data = heap->data;
45 if (i * 2 + 2 >= heap->nr)
53 if (i * 2 + 2 == heap->nr)
70 void min_heapify_all(struct min_heap *heap, argument
81 min_heap_pop(struct min_heap *heap, const struct min_heap_callbacks *func) argument
101 min_heap_pop_push(struct min_heap *heap, const void *element, const struct min_heap_callbacks *func) argument
111 min_heap_push(struct min_heap *heap, const void *element, const struct min_heap_callbacks *func) argument
[all...]
H A Ddma-heap.h18 * struct dma_heap_ops - ops to operate on a given heap
24 struct dma_buf *(*allocate)(struct dma_heap *heap,
31 * struct dma_heap_export_info - information needed to export a new dmabuf heap
33 * @ops: ops struct for this heap
34 * @priv: heap exporter private data
36 * Information needed to export a new dmabuf heap.
45 * dma_heap_get_drvdata() - get per-heap driver data
46 * @heap: DMA-Heap to retrieve private data for
49 * The per-heap data for the heap
[all...]
/linux-master/lib/
H A Dtest_min_heap.c5 * Test cases for the min max heap.
33 struct min_heap *heap,
36 int *values = heap->data;
41 min_heap_pop(heap, funcs);
42 while (heap->nr > 0) {
57 min_heap_pop(heap, funcs);
66 struct min_heap heap = { local
79 min_heapify_all(&heap, &funcs);
80 err = pop_verify_heap(min_heap, &heap, &funcs);
84 heap
32 pop_verify_heap(bool min_heap, struct min_heap *heap, const struct min_heap_callbacks *funcs) argument
99 struct min_heap heap = { local
132 struct min_heap heap = { local
[all...]
/linux-master/drivers/dma-buf/
H A Ddma-heap.c20 #include <linux/dma-heap.h>
21 #include <uapi/linux/dma-heap.h>
28 * struct dma_heap - represents a dmabuf heap in the system
30 * @ops: ops struct for this heap
31 * @heap_devt heap device node
33 * @heap_cdev heap char device
35 * Represents a heap of memory from which buffers can be made.
52 static int dma_heap_buffer_alloc(struct dma_heap *heap, size_t len, argument
67 dmabuf = heap->ops->allocate(heap, le
81 struct dma_heap *heap; local
99 struct dma_heap *heap = file->private_data; local
202 dma_heap_get_drvdata(struct dma_heap *heap) argument
214 dma_heap_get_name(struct dma_heap *heap) argument
221 struct dma_heap *heap, *h, *err_ret; local
[all...]
H A DMakefile4 obj-$(CONFIG_DMABUF_HEAPS) += dma-heap.o
/linux-master/drivers/gpu/drm/panthor/
H A Dpanthor_heap.c16 * The GPU heap context is an opaque structure used by the GPU to track the
17 * heap allocations. The driver should only touch it to initialize it (zero all
28 * @next: Next heap chunk in the list.
39 * struct panthor_heap_chunk - Structure used to keep track of allocated heap chunks.
42 /** @node: Used to insert the heap chunk in panthor_heap::chunks. */
45 /** @bo: Buffer object backing the heap chunk. */
50 * struct panthor_heap - Structure used to manage tiler heap contexts.
53 /** @chunks: List containing all heap chunks allocated so far. */
71 /** @chunk_count: Number of heap chunks currently allocated. */
78 * struct panthor_heap_pool - Pool of heap context
121 panthor_free_heap_chunk(struct panthor_vm *vm, struct panthor_heap *heap, struct panthor_heap_chunk *chunk) argument
134 panthor_alloc_heap_chunk(struct panthor_device *ptdev, struct panthor_vm *vm, struct panthor_heap *heap, bool initial_chunk) argument
194 panthor_free_heap_chunks(struct panthor_vm *vm, struct panthor_heap *heap) argument
203 panthor_alloc_heap_chunks(struct panthor_device *ptdev, struct panthor_vm *vm, struct panthor_heap *heap, u32 chunk_count) argument
223 struct panthor_heap *heap; local
275 struct panthor_heap *heap; local
371 struct panthor_heap *heap; local
434 struct panthor_heap *heap; local
587 struct panthor_heap *heap; local
[all...]
/linux-master/tools/testing/selftests/dmabuf-heaps/
H A DMakefile4 TEST_GEN_PROGS = dmabuf-heap
/linux-master/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Dmm.h12 u8 heap; member in struct:nvkm_mm_node
34 int nvkm_mm_init(struct nvkm_mm *, u8 heap, u32 offset, u32 length, u32 block);
36 int nvkm_mm_head(struct nvkm_mm *, u8 heap, u8 type, u32 size_max,
38 int nvkm_mm_tail(struct nvkm_mm *, u8 heap, u8 type, u32 size_max,
44 nvkm_mm_heap_size(struct nvkm_mm *mm, u8 heap) argument
49 if (node->heap == heap)
H A Dgpuobj.h21 struct nvkm_mm heap; member in struct:nvkm_gpuobj
/linux-master/tools/include/nolibc/
H A Dstdlib.h72 struct nolibc_heap *heap; local
77 heap = container_of(ptr, struct nolibc_heap, user_p);
78 munmap(heap, heap->len);
133 struct nolibc_heap *heap; local
136 len = sizeof(*heap) + len;
138 heap = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE,
140 if (__builtin_expect(heap == MAP_FAILED, 0))
143 heap->len = len;
144 return heap
167 struct nolibc_heap *heap; local
[all...]
/linux-master/fs/ubifs/
H A Dlprops.c22 * get_heap_comp_val - get the LEB properties value for heap comparisons.
39 * move_up_lpt_heap - move a new heap entry up as far as possible.
41 * @heap: LEB category heap
45 * New entries to a heap are added at the bottom and then moved up until the
50 static void move_up_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, argument
57 return; /* Already top of the heap */
59 /* Compare to parent and, if greater, move up the heap */
63 val2 = get_heap_comp_val(heap->arr[ppos], cat);
67 heap
87 adjust_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, struct ubifs_lprops *lprops, int hpos, int cat) argument
169 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; local
217 struct ubifs_lpt_heap *heap; local
246 struct ubifs_lpt_heap *heap; local
442 struct ubifs_lpt_heap *heap; local
757 struct ubifs_lpt_heap *heap; local
928 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; local
950 dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat, int add_pos) argument
1072 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; local
[all...]
H A Dfind.c45 struct ubifs_lpt_heap *heap; local
51 heap = &c->lpt_heap[cat - 1];
52 if (heap->cnt < heap->max_cnt)
130 struct ubifs_lpt_heap *heap; local
134 /* There may be an LEB with enough dirty space on the free heap */
135 heap = &c->lpt_heap[LPROPS_FREE - 1];
136 for (i = 0; i < heap->cnt; i++) {
137 lprops = heap->arr[i];
145 * A LEB may have fallen off of the bottom of the dirty heap, an
226 struct ubifs_lpt_heap *heap, *idx_heap; local
401 struct ubifs_lpt_heap *heap; local
820 struct ubifs_lpt_heap *heap; local
[all...]
/linux-master/drivers/gpu/drm/nouveau/nvif/
H A Dmmu.c35 kfree(mmu->heap);
53 mmu->heap = NULL;
72 mmu->heap = kmalloc_array(mmu->heap_nr, sizeof(*mmu->heap),
76 if (ret = -ENOMEM, !mmu->heap || !mmu->type)
92 mmu->heap[i].size = args.size;
112 mmu->type[i].heap = args.heap;
/linux-master/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dbase.c255 nvkm_mmu_type(struct nvkm_mmu *mmu, int heap, u8 type) argument
257 if (heap >= 0 && !WARN_ON(mmu->type_nr == ARRAY_SIZE(mmu->type))) {
258 mmu->type[mmu->type_nr].type = type | mmu->heap[heap].type;
259 mmu->type[mmu->type_nr].heap = heap;
268 if (!WARN_ON(mmu->heap_nr == ARRAY_SIZE(mmu->heap))) {
269 mmu->heap[mmu->heap_nr].type = type;
270 mmu->heap[mmu->heap_nr].size = size;
282 int heap; local
323 u8 heap = NVKM_MEM_VRAM; local
[all...]
/linux-master/arch/mips/boot/compressed/
H A Dhead.S32 PTR_LA a0, (.heap) /* heap address */
51 .comm .heap,BOOT_HEAP_SIZE,4
/linux-master/drivers/gpu/drm/nouveau/nvkm/core/
H A Dmm.c99 b->heap = a->heap;
111 nvkm_mm_head(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min, argument
122 if (unlikely(heap != NVKM_MM_HEAP_ANY)) {
123 if (this->heap != heap)
175 b->heap = a->heap;
186 nvkm_mm_tail(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min, argument
198 if (unlikely(heap !
240 nvkm_mm_init(struct nvkm_mm *mm, u8 heap, u32 offset, u32 length, u32 block) argument
[all...]
H A Dgpuobj.c180 ret = nvkm_mm_head(&parent->heap, 0, 1, size, size,
183 ret = nvkm_mm_tail(&parent->heap, 0, 1, size, size,
211 return nvkm_mm_init(&gpuobj->heap, 0, 0, gpuobj->size, 1);
220 nvkm_mm_free(&gpuobj->parent->heap, &gpuobj->node);
221 nvkm_mm_fini(&gpuobj->heap);
/linux-master/drivers/md/bcache/
H A Dmovinggc.c194 return (b = heap_peek(&ca->heap)) ? GC_SECTORS_USED(b) : 0;
212 ca->heap.used = 0;
221 if (!heap_full(&ca->heap)) {
223 heap_add(&ca->heap, b, bucket_cmp);
224 } else if (bucket_cmp(b, heap_peek(&ca->heap))) {
228 ca->heap.data[0] = b;
229 heap_sift(&ca->heap, 0, bucket_cmp);
234 heap_pop(&ca->heap, b, bucket_cmp);
238 while (heap_pop(&ca->heap, b, bucket_cmp))
/linux-master/drivers/gpu/drm/nouveau/include/nvif/
H A Dmmu.h16 } *heap; member in struct:nvif_mmu
28 u8 heap; member in struct:nvif_mmu::__anon585
H A Dif0008.h25 __u8 heap; member in struct:nvif_mmu_type_v0
/linux-master/drivers/dma-buf/heaps/
H A Dcma_heap.c3 * DMABUF CMA heap exporter
8 * Also utilizing parts of Andrew Davis' SRAM heap:
14 #include <linux/dma-heap.h>
27 struct dma_heap *heap; member in struct:cma_heap
32 struct cma_heap *heap; member in struct:cma_heap_buffer
247 struct cma_heap *cma_heap = buffer->heap;
275 static struct dma_buf *cma_heap_allocate(struct dma_heap *heap, argument
280 struct cma_heap *cma_heap = dma_heap_get_drvdata(heap);
339 buffer->heap = cma_heap;
343 exp_info.exp_name = dma_heap_get_name(heap);
[all...]
/linux-master/lib/zlib_deflate/
H A Ddeftree.c85 * need for the L_CODES extra codes used during heap construction. However
289 /* Index within the heap array of least frequent node in the Huffman tree */
293 * Remove the smallest element from the heap and recreate the heap with
294 * one less element. Updates heap and heap_len.
298 top = s->heap[SMALLEST]; \
299 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
312 * Restore the heap property by moving down the tree starting at node k,
314 * when the heap propert
[all...]
/linux-master/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/
H A Dnv40.c32 struct nvkm_mm heap; member in struct:nv40_instmem
103 nvkm_mm_free(&iobj->imem->heap, &iobj->node);
136 ret = nvkm_mm_head(&imem->heap, 0, 1, size, size, align ? align : 1, &iobj->node);
179 ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1);
221 nvkm_mm_fini(&imem->heap);
H A Dnv04.c32 struct nvkm_mm heap; member in struct:nv04_instmem
104 nvkm_mm_free(&iobj->imem->heap, &iobj->node);
137 ret = nvkm_mm_head(&imem->heap, 0, 1, size, size, align ? align : 1, &iobj->node);
210 ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1);
248 nvkm_mm_fini(&imem->heap);
/linux-master/drivers/gpu/drm/nouveau/
H A Dnouveau_abi16.h28 struct nvkm_mm heap; member in struct:nouveau_abi16_chan

Completed in 383 milliseconds

123