Home
last modified time | relevance | path

Searched full:heap (Results 1 – 25 of 341) sorted by relevance

12345678910>>...14

/openbmc/linux/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, in dma_heap_buffer_alloc() argument
67 dmabuf = heap->ops->allocate(heap, len, fd_flags, heap_flags); in dma_heap_buffer_alloc()
81 struct dma_heap *heap; in dma_heap_open() local
[all …]
/openbmc/linux/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, in min_heapify() argument
39 void *data = heap->data; in min_heapify()
42 if (pos * 2 + 1 >= heap->nr) in min_heapify()
51 if (pos * 2 + 2 < heap->nr) { in min_heapify()
68 void min_heapify_all(struct min_heap *heap, in min_heapify_all() 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.
51 void *dma_heap_get_drvdata(struct dma_heap *heap);
[all …]
/openbmc/linux/lib/
H A Dtest_min_heap.c5 * Test cases for the min max heap.
33 struct min_heap *heap, in pop_verify_heap() argument
36 int *values = heap->data; in pop_verify_heap()
41 min_heap_pop(heap, funcs); in pop_verify_heap()
42 while (heap->nr > 0) { in pop_verify_heap()
57 min_heap_pop(heap, funcs); in pop_verify_heap()
66 struct min_heap heap = { in test_heapify_all() local
79 min_heapify_all(&heap, &funcs); in test_heapify_all()
80 err = pop_verify_heap(min_heap, &heap, &funcs); in test_heapify_all()
84 heap.nr = ARRAY_SIZE(values); in test_heapify_all()
[all …]
/openbmc/u-boot/fs/ubifs/
H A Dlprops.c25 * get_heap_comp_val - get the LEB properties value for heap comparisons.
42 * move_up_lpt_heap - move a new heap entry up as far as possible.
44 * @heap: LEB category heap
48 * New entries to a heap are added at the bottom and then moved up until the
53 static void move_up_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in move_up_lpt_heap() argument
60 return; /* Already top of the heap */ in move_up_lpt_heap()
62 /* Compare to parent and, if greater, move up the heap */ in move_up_lpt_heap()
66 val2 = get_heap_comp_val(heap->arr[ppos], cat); in move_up_lpt_heap()
70 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap()
71 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap()
[all …]
/openbmc/linux/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, in move_up_lpt_heap() argument
57 return; /* Already top of the heap */ in move_up_lpt_heap()
59 /* Compare to parent and, if greater, move up the heap */ in move_up_lpt_heap()
63 val2 = get_heap_comp_val(heap->arr[ppos], cat); in move_up_lpt_heap()
67 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap()
68 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap()
[all …]
H A Dfind.c45 struct ubifs_lpt_heap *heap; in valuable() local
51 heap = &c->lpt_heap[cat - 1]; in valuable()
52 if (heap->cnt < heap->max_cnt) in valuable()
129 struct ubifs_lpt_heap *heap; in scan_for_dirty() local
133 /* There may be an LEB with enough dirty space on the free heap */ in scan_for_dirty()
134 heap = &c->lpt_heap[LPROPS_FREE - 1]; in scan_for_dirty()
135 for (i = 0; i < heap->cnt; i++) { in scan_for_dirty()
136 lprops = heap->arr[i]; in scan_for_dirty()
144 * A LEB may have fallen off of the bottom of the dirty heap, and ended in scan_for_dirty()
199 * dirty index heap, and it falls-back to LPT scanning if the heaps are empty
[all …]
/openbmc/u-boot/lib/bzip2/
H A Dbzlib_huffman.c77 zz = z; tmp = heap[zz]; \
78 while (weight[tmp] < weight[heap[zz >> 1]]) { \
79 heap[zz] = heap[zz >> 1]; \
82 heap[zz] = tmp; \
88 zz = z; tmp = heap[zz]; \
93 weight[heap[yy+1]] < weight[heap[yy]]) \
95 if (weight[tmp] < weight[heap[yy]]) break; \
96 heap[zz] = heap[yy]; \
99 heap[zz] = tmp; \
110 Nodes and heap entries run from 1. Entry 0 in BZ2_hbMakeCodeLengths()
[all …]
/openbmc/qemu/tests/tcg/aarch64/system/
H A Dsemiheap.c39 ml_printf("Semihosting Heap Info Test\n"); in main()
44 ml_printf("null heap: %p -> %p\n", info.heap_base, info.heap_limit); in main()
48 /* Error if heap base is above limit */ in main()
50 ml_printf("heap base %p >= heap_limit %p\n", in main()
64 * struct (on the stack) should not be inside the reported heap. in main()
67 ml_printf("info appears to be inside the heap: %p in %p:%p\n", in main()
72 ml_printf("heap: %p -> %p\n", info.heap_base, info.heap_limit); in main()
75 /* finally can we read/write the heap */ in main()
84 ml_printf("unexpected value in heap: %d @ %p", tmp, ptr_to_heap); in main()
89 ml_printf("r/w to heap up to %p\n", ptr_to_heap); in main()
/openbmc/linux/drivers/dma-buf/heaps/
H A DKconfig2 bool "DMA-BUF System Heap"
5 Choose this option to enable the system dmabuf heap. The system heap
9 bool "DMA-BUF CMA Heap"
12 Choose this option to enable dma-buf CMA heap. This heap is backed
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
32 struct cma_heap *heap; member
248 struct cma_heap *cma_heap = buffer->heap; in cma_heap_dma_buf_release()
276 static struct dma_buf *cma_heap_allocate(struct dma_heap *heap, in cma_heap_allocate() argument
281 struct cma_heap *cma_heap = dma_heap_get_drvdata(heap); in cma_heap_allocate()
340 buffer->heap = cma_heap; in cma_heap_allocate()
344 exp_info.exp_name = dma_heap_get_name(heap); in cma_heap_allocate()
[all …]
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dbase.c255 nvkm_mmu_type(struct nvkm_mmu *mmu, int heap, u8 type) in nvkm_mmu_type() argument
257 if (heap >= 0 && !WARN_ON(mmu->type_nr == ARRAY_SIZE(mmu->type))) { in nvkm_mmu_type()
258 mmu->type[mmu->type_nr].type = type | mmu->heap[heap].type; in nvkm_mmu_type()
259 mmu->type[mmu->type_nr].heap = heap; in nvkm_mmu_type()
268 if (!WARN_ON(mmu->heap_nr == ARRAY_SIZE(mmu->heap))) { in nvkm_mmu_heap()
269 mmu->heap[mmu->heap_nr].type = type; in nvkm_mmu_heap()
270 mmu->heap[mmu->heap_nr].size = size; in nvkm_mmu_heap()
282 int heap; in nvkm_mmu_host() local
285 heap = nvkm_mmu_heap(mmu, NVKM_MEM_HOST, ~0ULL); in nvkm_mmu_host()
286 nvkm_mmu_type(mmu, heap, type); in nvkm_mmu_host()
[all …]
/openbmc/linux/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Dmm.h12 u8 heap; member
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) in nvkm_mm_heap_size() argument
49 if (node->heap == heap) in nvkm_mm_heap_size()
/openbmc/linux/tools/include/nolibc/
H A Dstdlib.h72 struct nolibc_heap *heap; in free() local
77 heap = container_of(ptr, struct nolibc_heap, user_p); in free()
78 munmap(heap, heap->len); in free()
133 struct nolibc_heap *heap; in malloc() local
136 len = sizeof(*heap) + len; in malloc()
138 heap = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, in malloc()
140 if (__builtin_expect(heap == MAP_FAILED, 0)) in malloc()
143 heap->len = len; in malloc()
144 return heap->user_p; in malloc()
158 * No need to zero the heap, the MAP_ANONYMOUS in malloc() in calloc()
[all …]
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/core/
H A Dmm.c99 b->heap = a->heap; in region_head()
111 nvkm_mm_head(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min, in nvkm_mm_head() argument
122 if (unlikely(heap != NVKM_MM_HEAP_ANY)) { in nvkm_mm_head()
123 if (this->heap != heap) in nvkm_mm_head()
175 b->heap = a->heap; in region_tail()
186 nvkm_mm_tail(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min, in nvkm_mm_tail() argument
198 if (unlikely(heap != NVKM_MM_HEAP_ANY)) { in nvkm_mm_tail()
199 if (this->heap != heap) in nvkm_mm_tail()
240 nvkm_mm_init(struct nvkm_mm *mm, u8 heap, u32 offset, u32 length, u32 block) in nvkm_mm_init() argument
277 node->heap = heap; in nvkm_mm_init()
/openbmc/linux/Documentation/ABI/testing/
H A Dsysfs-kernel-mm-cma6 heap name (also sometimes called CMA areas).
8 Each CMA heap subdirectory (that is, each
9 /sys/kernel/mm/cma/<cma-heap-name> directory) contains the
15 What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_success
21 What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_fail
/openbmc/linux/arch/powerpc/include/asm/
H A Drheap.h4 * Header file for the implementation of a remote heap.
49 /* Create a remote heap dynamically */
52 /* Destroy a remote heap, created by rh_create() */
65 /* Allocate the given size from the remote heap (with alignment) */
69 /* Allocate the given size from the remote heap */
83 /* Simple dump of remote heap info */
/openbmc/linux/drivers/gpu/drm/nouveau/nvif/
H A Dmmu.c35 kfree(mmu->heap); in nvif_mmu_dtor()
53 mmu->heap = NULL; in nvif_mmu_ctor()
72 mmu->heap = kmalloc_array(mmu->heap_nr, sizeof(*mmu->heap), in nvif_mmu_ctor()
76 if (ret = -ENOMEM, !mmu->heap || !mmu->type) in nvif_mmu_ctor()
92 mmu->heap[i].size = args.size; in nvif_mmu_ctor()
112 mmu->type[i].heap = args.heap; in nvif_mmu_ctor()
/openbmc/linux/drivers/md/bcache/
H A Dmovinggc.c194 return (b = heap_peek(&ca->heap)) ? GC_SECTORS_USED(b) : 0; in bucket_heap_top()
212 ca->heap.used = 0; in bch_moving_gc()
221 if (!heap_full(&ca->heap)) { in bch_moving_gc()
223 heap_add(&ca->heap, b, bucket_cmp); in bch_moving_gc()
224 } else if (bucket_cmp(b, heap_peek(&ca->heap))) { in bch_moving_gc()
228 ca->heap.data[0] = b; in bch_moving_gc()
229 heap_sift(&ca->heap, 0, bucket_cmp); in bch_moving_gc()
234 heap_pop(&ca->heap, b, bucket_cmp); in bch_moving_gc()
238 while (heap_pop(&ca->heap, b, bucket_cmp)) in bch_moving_gc()
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-devtools/dmalloc/dmalloc/
H A D02-Makefile.in.patch53 OBJS = arg_check.o compat.o dmalloc_rand.o dmalloc_tab.o env.o heap.o
215 error_val.h heap.h
218 + error_val.h heap.h
249 error_val.h heap.h
252 + error_val.h heap.h
273 heap.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
274 dmalloc_loc.h error.h error_val.h heap.h
275 +heap_sl.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \
276 + dmalloc_loc.h error.h error_val.h heap.h
280 debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \
[all …]
/openbmc/qemu/tests/tcg/multiarch/arm-compat-semi/
H A Dsemihosting.c42 printf("null heap: %p -> %p\n", info.heap_base, info.heap_limit); in main()
46 /* Error if heap base is above limit */ in main()
48 printf("heap base %p >= heap_limit %p\n", in main()
70 printf("info appears to be inside the heap: %p in %p:%p\n", in main()
75 printf("heap: %p -> %p\n", info.heap_base, info.heap_limit); in main()
/openbmc/linux/kernel/sched/
H A Dcpudeadline.c110 * @cp: the cpudl max-heap context
165 * cpudl_clear - remove a CPU from the cpudl max-heap
166 * @cp: the cpudl max-heap context
204 * cpudl_set - update the cpudl max-heap
205 * @cp: the cpudl max-heap context
241 * @cp: the cpudl max-heap context
251 * @cp: the cpudl max-heap context
261 * @cp: the cpudl max-heap context
289 * @cp: the cpudl max-heap context
/openbmc/linux/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 property is re-established (each father smaller than its
323 int v = s->heap[k]; in pqdownheap()
328 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { in pqdownheap()
[all …]
/openbmc/u-boot/lib/zlib/
H A Dtrees.c93 * need for the L_CODES extra codes used during heap construction. However
431 /* Index within the heap array of least frequent node in the Huffman tree */
435 * Remove the smallest element from the heap and recreate the heap with
436 * one less element. Updates heap and heap_len.
440 top = s->heap[SMALLEST]; \
441 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
454 * Restore the heap property by moving down the tree starting at node k,
456 * when the heap property is re-established (each father smaller than its
464 int v = s->heap[k];
469 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
[all …]
/openbmc/linux/arch/mips/boot/compressed/
H A Dhead.S32 PTR_LA a0, (.heap) /* heap address */
51 .comm .heap,BOOT_HEAP_SIZE,4

12345678910>>...14