/Linux-v4.19/drivers/staging/android/ion/ |
D | ion_heap.c | 19 void *ion_heap_map_kernel(struct ion_heap *heap, in ion_heap_map_kernel() argument 57 void ion_heap_unmap_kernel(struct ion_heap *heap, in ion_heap_unmap_kernel() argument 63 int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer, in ion_heap_map_user() argument 155 void ion_heap_freelist_add(struct ion_heap *heap, struct ion_buffer *buffer) in ion_heap_freelist_add() argument 157 spin_lock(&heap->free_lock); in ion_heap_freelist_add() 158 list_add(&buffer->list, &heap->free_list); in ion_heap_freelist_add() 159 heap->free_list_size += buffer->size; in ion_heap_freelist_add() 160 spin_unlock(&heap->free_lock); in ion_heap_freelist_add() 161 wake_up(&heap->waitqueue); in ion_heap_freelist_add() 164 size_t ion_heap_freelist_size(struct ion_heap *heap) in ion_heap_freelist_size() argument [all …]
|
D | ion_system_heap.c | 43 struct ion_heap heap; member 47 static struct page *alloc_buffer_page(struct ion_system_heap *heap, in alloc_buffer_page() argument 51 struct ion_page_pool *pool = heap->pools[order_to_index(order)]; in alloc_buffer_page() 56 static void free_buffer_page(struct ion_system_heap *heap, in free_buffer_page() argument 68 pool = heap->pools[order_to_index(order)]; in free_buffer_page() 73 static struct page *alloc_largest_available(struct ion_system_heap *heap, in alloc_largest_available() argument 87 page = alloc_buffer_page(heap, buffer, orders[i]); in alloc_largest_available() 97 static int ion_system_heap_allocate(struct ion_heap *heap, in ion_system_heap_allocate() argument 102 struct ion_system_heap *sys_heap = container_of(heap, in ion_system_heap_allocate() 104 heap); in ion_system_heap_allocate() [all …]
|
D | ion.c | 63 static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, in ion_buffer_create() argument 75 buffer->heap = heap; in ion_buffer_create() 80 ret = heap->ops->allocate(heap, buffer, len, flags); in ion_buffer_create() 83 if (!(heap->flags & ION_HEAP_FLAG_DEFER_FREE)) in ion_buffer_create() 86 ion_heap_freelist_drain(heap, 0); in ion_buffer_create() 87 ret = heap->ops->allocate(heap, buffer, len, flags); in ion_buffer_create() 106 heap->ops->free(buffer); in ion_buffer_create() 117 buffer->heap->ops->unmap_kernel(buffer->heap, buffer); in ion_buffer_destroy() 119 buffer->heap->ops->free(buffer); in ion_buffer_destroy() 125 struct ion_heap *heap = buffer->heap; in _ion_buffer_destroy() local [all …]
|
D | ion_carveout_heap.c | 21 struct ion_heap heap; member 26 static phys_addr_t ion_carveout_allocate(struct ion_heap *heap, in ion_carveout_allocate() argument 30 container_of(heap, struct ion_carveout_heap, heap); in ion_carveout_allocate() 39 static void ion_carveout_free(struct ion_heap *heap, phys_addr_t addr, in ion_carveout_free() argument 43 container_of(heap, struct ion_carveout_heap, heap); in ion_carveout_free() 50 static int ion_carveout_heap_allocate(struct ion_heap *heap, in ion_carveout_heap_allocate() argument 66 paddr = ion_carveout_allocate(heap, size); in ion_carveout_heap_allocate() 86 struct ion_heap *heap = buffer->heap; in ion_carveout_heap_free() local 93 ion_carveout_free(heap, paddr, buffer->size); in ion_carveout_heap_free() 133 carveout_heap->heap.ops = &carveout_heap_ops; in ion_carveout_heap_create() [all …]
|
D | ion.h | 69 struct ion_heap *heap; member 116 int (*allocate)(struct ion_heap *heap, 120 void * (*map_kernel)(struct ion_heap *heap, struct ion_buffer *buffer); 121 void (*unmap_kernel)(struct ion_heap *heap, struct ion_buffer *buffer); 124 int (*shrink)(struct ion_heap *heap, gfp_t gfp_mask, int nr_to_scan); 183 int (*debug_show)(struct ion_heap *heap, struct seq_file *s, 191 void ion_device_add_heap(struct ion_heap *heap); 197 void *ion_heap_map_kernel(struct ion_heap *heap, struct ion_buffer *buffer); 198 void ion_heap_unmap_kernel(struct ion_heap *heap, struct ion_buffer *buffer); 199 int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer, [all …]
|
D | ion_cma_heap.c | 20 struct ion_heap heap; member 24 #define to_cma_heap(x) container_of(x, struct ion_cma_heap, heap) 27 static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, in ion_cma_allocate() argument 31 struct ion_cma_heap *cma_heap = to_cma_heap(heap); in ion_cma_allocate() 85 struct ion_cma_heap *cma_heap = to_cma_heap(buffer->heap); in ion_cma_free() 113 cma_heap->heap.ops = &ion_cma_ops; in __ion_cma_heap_create() 119 cma_heap->heap.type = ION_HEAP_TYPE_DMA; in __ion_cma_heap_create() 120 return &cma_heap->heap; in __ion_cma_heap_create() 125 struct ion_heap *heap; in __ion_add_cma_heaps() local 127 heap = __ion_cma_heap_create(cma); in __ion_add_cma_heaps() [all …]
|
D | ion_chunk_heap.c | 18 struct ion_heap heap; member 26 static int ion_chunk_heap_allocate(struct ion_heap *heap, in ion_chunk_heap_allocate() argument 32 container_of(heap, struct ion_chunk_heap, heap); in ion_chunk_heap_allocate() 82 struct ion_heap *heap = buffer->heap; in ion_chunk_heap_free() local 84 container_of(heap, struct ion_chunk_heap, heap); in ion_chunk_heap_free() 141 chunk_heap->heap.ops = &chunk_heap_ops; in ion_chunk_heap_create() 142 chunk_heap->heap.type = ION_HEAP_TYPE_CHUNK; in ion_chunk_heap_create() 143 chunk_heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE; in ion_chunk_heap_create() 147 return &chunk_heap->heap; in ion_chunk_heap_create()
|
D | Kconfig | 14 bool "Ion system heap" 17 Choose this option to enable the Ion system heap. The system heap 21 bool "Ion carveout heap support" 30 bool "Ion chunk heap support" 33 Choose this option to enable chunk heaps with Ion. This heap is 34 similar in function the carveout heap but memory is broken down 39 bool "Ion CMA heap support" 42 Choose this option to enable CMA heaps with Ion. This heap is backed
|
/Linux-v4.19/fs/ubifs/ |
D | lprops.c | 62 static void move_up_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in move_up_lpt_heap() argument 75 val2 = get_heap_comp_val(heap->arr[ppos], cat); in move_up_lpt_heap() 79 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap() 80 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap() 81 heap->arr[ppos] = lprops; in move_up_lpt_heap() 99 static void adjust_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in adjust_lpt_heap() argument 109 val2 = get_heap_comp_val(heap->arr[ppos], cat); in adjust_lpt_heap() 113 heap->arr[ppos]->hpos = hpos; in adjust_lpt_heap() 114 heap->arr[hpos] = heap->arr[ppos]; in adjust_lpt_heap() 115 heap->arr[ppos] = lprops; in adjust_lpt_heap() [all …]
|
D | find.c | 57 struct ubifs_lpt_heap *heap; in valuable() local 63 heap = &c->lpt_heap[cat - 1]; in valuable() 64 if (heap->cnt < heap->max_cnt) in valuable() 141 struct ubifs_lpt_heap *heap; in scan_for_dirty() local 146 heap = &c->lpt_heap[LPROPS_FREE - 1]; in scan_for_dirty() 147 for (i = 0; i < heap->cnt; i++) { in scan_for_dirty() 148 lprops = heap->arr[i]; in scan_for_dirty() 238 struct ubifs_lpt_heap *heap, *idx_heap; in ubifs_find_dirty_leb() local 284 heap = &c->lpt_heap[LPROPS_DIRTY - 1]; in ubifs_find_dirty_leb() 304 if (heap->cnt) { in ubifs_find_dirty_leb() [all …]
|
/Linux-v4.19/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-v4.19/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-v4.19/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()
|
D | gpuobj.c | 180 ret = nvkm_mm_head(&parent->heap, 0, 1, size, size, in nvkm_gpuobj_ctor() 183 ret = nvkm_mm_tail(&parent->heap, 0, 1, size, size, in nvkm_gpuobj_ctor() 211 return nvkm_mm_init(&gpuobj->heap, 0, 0, gpuobj->size, 1); in nvkm_gpuobj_ctor() 220 nvkm_mm_free(&gpuobj->parent->heap, &gpuobj->node); in nvkm_gpuobj_del() 221 nvkm_mm_fini(&gpuobj->heap); in nvkm_gpuobj_del()
|
/Linux-v4.19/drivers/gpu/drm/nouveau/nvif/ |
D | mmu.c | 32 kfree(mmu->heap); in nvif_mmu_fini() 49 mmu->heap = NULL; in nvif_mmu_init() 68 mmu->heap = kmalloc_array(mmu->heap_nr, sizeof(*mmu->heap), in nvif_mmu_init() 72 if (ret = -ENOMEM, !mmu->heap || !mmu->type) in nvif_mmu_init() 88 mmu->heap[i].size = args.size; in nvif_mmu_init() 108 mmu->type[i].heap = args.heap; in nvif_mmu_init()
|
/Linux-v4.19/tools/testing/selftests/android/ion/ |
D | README | 13 two user space processes, using various heap types. 14 The following heap types are supported by ION driver. 22 Each heap is associated with the respective heap id. 26 the heap id, writing some data to this buffer and then exporting the FD 61 buffer sharing using ion system heap. 62 Currently the heap size is hard coded as just 10 bytes inside this script. 68 Now you can run the export and import manually by specifying the heap type 69 and the heap size. 82 heap type: 0 83 heap id: 1 [all …]
|
/Linux-v4.19/drivers/md/bcache/ |
D | movinggc.c | 194 return (b = heap_peek(&ca->heap)) ? GC_SECTORS_USED(b) : 0; in bucket_heap_top() 213 ca->heap.used = 0; in bch_moving_gc() 222 if (!heap_full(&ca->heap)) { in bch_moving_gc() 224 heap_add(&ca->heap, b, bucket_cmp); in bch_moving_gc() 225 } else if (bucket_cmp(b, heap_peek(&ca->heap))) { in bch_moving_gc() 229 ca->heap.data[0] = b; in bch_moving_gc() 230 heap_sift(&ca->heap, 0, bucket_cmp); in bch_moving_gc() 235 heap_pop(&ca->heap, b, bucket_cmp); in bch_moving_gc() 239 while (heap_pop(&ca->heap, b, bucket_cmp)) in bch_moving_gc()
|
D | util.h | 42 #define init_heap(heap, _size, gfp) \ argument 45 (heap)->used = 0; \ 46 (heap)->size = (_size); \ 47 _bytes = (heap)->size * sizeof(*(heap)->data); \ 48 (heap)->data = kvmalloc(_bytes, (gfp) & GFP_KERNEL); \ 49 (heap)->data; \ 52 #define free_heap(heap) \ argument 54 kvfree((heap)->data); \ 55 (heap)->data = NULL; \
|
D | alloc.c | 185 ca->heap.used = 0; in invalidate_buckets_lru() 191 if (!heap_full(&ca->heap)) in invalidate_buckets_lru() 192 heap_add(&ca->heap, b, bucket_max_cmp); in invalidate_buckets_lru() 193 else if (bucket_max_cmp(b, heap_peek(&ca->heap))) { in invalidate_buckets_lru() 194 ca->heap.data[0] = b; in invalidate_buckets_lru() 195 heap_sift(&ca->heap, 0, bucket_max_cmp); in invalidate_buckets_lru() 199 for (i = ca->heap.used / 2 - 1; i >= 0; --i) in invalidate_buckets_lru() 200 heap_sift(&ca->heap, i, bucket_min_cmp); in invalidate_buckets_lru() 203 if (!heap_pop(&ca->heap, b, bucket_min_cmp)) { in invalidate_buckets_lru()
|
/Linux-v4.19/lib/zlib_deflate/ |
D | deftree.c | 352 top = s->heap[SMALLEST]; \ 353 s->heap[SMALLEST] = s->heap[s->heap_len--]; \ 377 int v = s->heap[k]; in pqdownheap() 382 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { in pqdownheap() 386 if (smaller(tree, v, s->heap[j], s->depth)) break; in pqdownheap() 389 s->heap[k] = s->heap[j]; k = j; in pqdownheap() 394 s->heap[k] = v; in pqdownheap() 430 tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ in gen_bitlen() 433 n = s->heap[h]; in gen_bitlen() 474 m = s->heap[--h]; in gen_bitlen() [all …]
|
/Linux-v4.19/tools/perf/util/ |
D | s390-cpumsf.c | 166 struct auxtrace_heap heap; member 664 return auxtrace_heap__add(&sf->heap, queue_nr, ts); in s390_cpumsf_setup_queue() 700 if (!sf->heap.heap_cnt) in s390_cpumsf_process_queues() 703 if (sf->heap.heap_array[0].ordinal >= timestamp) in s390_cpumsf_process_queues() 706 queue_nr = sf->heap.heap_array[0].queue_nr; in s390_cpumsf_process_queues() 710 auxtrace_heap__pop(&sf->heap); in s390_cpumsf_process_queues() 711 if (sf->heap.heap_cnt) { in s390_cpumsf_process_queues() 712 ts = sf->heap.heap_array[0].ordinal + 1; in s390_cpumsf_process_queues() 721 auxtrace_heap__add(&sf->heap, queue_nr, ts); in s390_cpumsf_process_queues() 725 ret = auxtrace_heap__add(&sf->heap, queue_nr, ts); in s390_cpumsf_process_queues() [all …]
|
/Linux-v4.19/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/ |
D | nv04.c | 31 struct nvkm_mm heap; member 103 nvkm_mm_free(&iobj->imem->heap, &iobj->node); in nv04_instobj_dtor() 136 ret = nvkm_mm_head(&imem->heap, 0, 1, size, size, in nv04_instobj_new() 168 ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1); in nv04_instmem_oneinit() 206 nvkm_mm_fini(&imem->heap); in nv04_instmem_dtor()
|
D | nv40.c | 32 struct nvkm_mm heap; member 103 nvkm_mm_free(&iobj->imem->heap, &iobj->node); in nv40_instobj_dtor() 136 ret = nvkm_mm_head(&imem->heap, 0, 1, size, size, in nv40_instobj_new() 180 ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1); in nv40_instmem_oneinit() 222 nvkm_mm_fini(&imem->heap); in nv40_instmem_dtor()
|
/Linux-v4.19/arch/x86/boot/compressed/ |
D | misc.c | 339 asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, in extract_kernel() argument 370 free_mem_ptr = heap; /* Heap */ in extract_kernel() 371 free_mem_end_ptr = heap + BOOT_HEAP_SIZE; in extract_kernel() 401 if (heap > 0x3fffffffffffUL) in extract_kernel() 406 if (heap > ((-__PAGE_OFFSET-(128<<20)-1) & 0x7fffffff)) in extract_kernel()
|
/Linux-v4.19/arch/mips/boot/compressed/ |
D | head.S | 35 PTR_LA a0, (.heap) /* heap address */ 55 .comm .heap,BOOT_HEAP_SIZE,4
|