/Linux-v6.1/drivers/dma-buf/ |
D | dma-heap.c | 20 #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 …]
|
/Linux-v6.1/include/linux/ |
D | min_heap.h | 10 * 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 …]
|
D | dma-heap.h | 18 * 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 …]
|
D | kfence.h | 41 * with regular heap objects (e.g. KFENCE objects must never be added to the 42 * allocator freelists). Failing to do so may and will result in heap 112 * kfence_alloc() should be inserted into the heap allocation fast path, 133 * @addr: pointer to a heap object 160 * __kfence_free() - release a KFENCE heap object to KFENCE pool 170 * kfence_free() - try to release an arbitrary heap object to KFENCE pool
|
/Linux-v6.1/lib/ |
D | test_min_heap.c | 5 * 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 …]
|
/Linux-v6.1/fs/ubifs/ |
D | lprops.c | 22 * 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 …]
|
D | find.c | 45 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 …]
|
/Linux-v6.1/drivers/dma-buf/heaps/ |
D | Kconfig | 2 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
|
D | cma_heap.c | 3 * 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 …]
|
D | system_heap.c | 3 * DMABUF System heap exporter 8 * Portions based off of Andrew Davis' SRAM heap: 15 #include <linux/dma-heap.h> 27 struct dma_heap *heap; member 335 static struct dma_buf *system_heap_allocate(struct dma_heap *heap, in system_heap_allocate() argument 357 buffer->heap = heap; in system_heap_allocate() 394 exp_info.exp_name = dma_heap_get_name(heap); in system_heap_allocate()
|
/Linux-v6.1/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
D | base.c | 255 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 …]
|
/Linux-v6.1/drivers/gpu/drm/nouveau/include/nvkm/core/ |
D | mm.h | 12 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()
|
/Linux-v6.1/tools/include/nolibc/ |
D | stdlib.h | 71 struct nolibc_heap *heap; in free() local 76 heap = container_of(ptr, struct nolibc_heap, user_p); in free() 77 munmap(heap, heap->len); in free() 114 struct nolibc_heap *heap; in malloc() local 117 len = sizeof(*heap) + len; in malloc() 119 heap = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, in malloc() 121 if (__builtin_expect(heap == MAP_FAILED, 0)) in malloc() 124 heap->len = len; in malloc() 125 return heap->user_p; in malloc() 139 * No need to zero the heap, the MAP_ANONYMOUS in malloc() in calloc() [all …]
|
/Linux-v6.1/drivers/gpu/drm/nouveau/nvkm/core/ |
D | mm.c | 99 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()
|
/Linux-v6.1/Documentation/ABI/testing/ |
D | sysfs-kernel-mm-cma | 6 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
|
/Linux-v6.1/arch/powerpc/include/asm/ |
D | rheap.h | 4 * 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 */
|
/Linux-v6.1/drivers/gpu/drm/nouveau/nvif/ |
D | mmu.c | 32 kfree(mmu->heap); in nvif_mmu_dtor() 50 mmu->heap = NULL; in nvif_mmu_ctor() 69 mmu->heap = kmalloc_array(mmu->heap_nr, sizeof(*mmu->heap), in nvif_mmu_ctor() 73 if (ret = -ENOMEM, !mmu->heap || !mmu->type) in nvif_mmu_ctor() 89 mmu->heap[i].size = args.size; in nvif_mmu_ctor() 109 mmu->type[i].heap = args.heap; in nvif_mmu_ctor()
|
/Linux-v6.1/drivers/md/bcache/ |
D | movinggc.c | 194 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()
|
/Linux-v6.1/kernel/sched/ |
D | cpudeadline.c | 110 * @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
|
/Linux-v6.1/lib/zlib_deflate/ |
D | deftree.c | 85 * 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 …]
|
/Linux-v6.1/arch/x86/boot/ |
D | main.c | 22 char *HEAP = _end; variable 23 char *heap_end = _end; /* Default end of heap = no heap */ 130 /* Boot protocol 2.00 only, no heap available */ in init_heap() 148 /* End of heap check */ in main()
|
D | boot.h | 170 /* Heap -- available for dynamic lists. */ 172 extern char *HEAP; 174 #define RESET_HEAP() ((void *)( HEAP = _end )) 179 HEAP = (char *)(((size_t)HEAP+(a-1)) & ~(a-1)); in __get_heap() 180 tmp = HEAP; in __get_heap() 181 HEAP += s*n; in __get_heap() 189 return (int)(heap_end-HEAP) >= (int)n; in heap_free()
|
/Linux-v6.1/arch/mips/boot/compressed/ |
D | head.S | 32 PTR_LA a0, (.heap) /* heap address */ 51 .comm .heap,BOOT_HEAP_SIZE,4
|
/Linux-v6.1/drivers/gpu/drm/vboxvideo/ |
D | hgsmi_base.c | 15 * @ctx: The context of the guest heap to use. 40 * @ctx: The context of the guest heap to use. 79 * @ctx: The context containing the heap used. 108 * @ctx: The context containing the heap to be used. 183 * @ctx: The context containing the heap used.
|
/Linux-v6.1/drivers/gpu/drm/lima/ |
D | lima_gp.c | 37 dev_dbg(dev->dev, "gp out of heap irq status=%x\n", in lima_gp_irq_handler() 136 /* update real heap buffer size for GP */ in lima_gp_task_run() 147 task->heap = bo; in lima_gp_task_run() 225 if (fail_size == task->heap->heap_size) { in lima_gp_task_recover() 228 ret = lima_heap_alloc(task->heap, task->vm); in lima_gp_task_recover() 238 f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + task->heap->heap_size; in lima_gp_task_recover()
|