| /linux/drivers/gpu/drm/panthor/ |
| H A D | panthor_heap.c | 17 * The GPU heap context is an opaque structure used by the GPU to track the 18 * heap allocations. The driver should only touch it to initialize it (zero all 25 * struct panthor_heap_chunk_header - Heap chunk header 29 * @next: Next heap chunk in the list. 40 * struct panthor_heap_chunk - Structure used to keep track of allocated heap chunks. 43 /** @node: Used to insert the heap chunk in panthor_heap::chunks. */ 46 /** @bo: Buffer object backing the heap chunk. */ 51 * struct panthor_heap - Structure used to manage tiler heap contexts. 54 /** @chunks: List containing all heap chunks allocated so far. */ 72 /** @chunk_count: Number of heap chunk 126 panthor_free_heap_chunk(struct panthor_heap_pool * pool,struct panthor_heap * heap,struct panthor_heap_chunk * chunk) panthor_free_heap_chunk() argument 141 panthor_alloc_heap_chunk(struct panthor_heap_pool * pool,struct panthor_heap * heap,bool initial_chunk) panthor_alloc_heap_chunk() argument 203 panthor_free_heap_chunks(struct panthor_heap_pool * pool,struct panthor_heap * heap) panthor_free_heap_chunks() argument 212 panthor_alloc_heap_chunks(struct panthor_heap_pool * pool,struct panthor_heap * heap,u32 chunk_count) panthor_alloc_heap_chunks() argument 230 struct panthor_heap *heap; panthor_heap_destroy_locked() local 282 struct panthor_heap *heap; panthor_heap_create() local 377 struct panthor_heap *heap; panthor_heap_return_chunk() local 441 struct panthor_heap *heap; panthor_heap_grow() local 597 struct panthor_heap *heap; panthor_heap_pool_destroy() local [all...] |
| /linux/drivers/dma-buf/ |
| H A D | dma-heap.c | 12 #include <linux/dma-heap.h> 20 #include <uapi/linux/dma-heap.h> 27 * struct dma_heap - represents a dmabuf heap in the system 29 * @ops: ops struct for this heap 30 * @priv: private data 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. 55 "Enable cgroup-based memory accounting for dma-buf heap allocations (default=false)."); 58 static int dma_heap_buffer_alloc(struct dma_heap *heap, size_ in dma_heap_buffer_alloc() 57 dma_heap_buffer_alloc(struct dma_heap * heap,size_t len,u32 fd_flags,u64 heap_flags) dma_heap_buffer_alloc() argument 86 struct dma_heap *heap; dma_heap_open() local 104 struct dma_heap *heap = file->private_data; dma_heap_ioctl_allocate() local 207 dma_heap_get_drvdata(struct dma_heap * heap) dma_heap_get_drvdata() argument 220 dma_heap_get_name(struct dma_heap * heap) dma_heap_get_name() argument 232 struct dma_heap *heap, *h, *err_ret; dma_heap_add() local [all...] |
| /linux/fs/ubifs/ |
| H A 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 …]
|
| H A 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() 130 struct ubifs_lpt_heap *heap; in scan_for_dirty() local 134 /* There may be an LEB with enough dirty space on the free heap */ in scan_for_dirty() 135 heap = &c->lpt_heap[LPROPS_FREE - 1]; in scan_for_dirty() 136 for (i = 0; i < heap->cnt; i++) { in scan_for_dirty() 137 lprops = heap->arr[i]; in scan_for_dirty() 145 * 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/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
| H A 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/drivers/tee/ |
| H A D | tee_heap.c | 7 #include <linux/dma-heap.h> 18 struct dma_heap *heap; member 29 struct tee_dma_heap *heap; member 153 buf->heap->pool->ops->free(buf->heap->pool, &buf->table); in tee_heap_buf_free() 154 mutex_lock(&buf->heap->mu); in tee_heap_buf_free() 155 put_tee_heap(buf->heap); in tee_heap_buf_free() 156 mutex_unlock(&buf->heap->mu); in tee_heap_buf_free() 168 static struct dma_buf *tee_dma_heap_alloc(struct dma_heap *heap, in tee_dma_heap_alloc() argument 172 struct tee_dma_heap *h = dma_heap_get_drvdata(heap); in tee_dma_heap_alloc() 197 buf->heap = h; in tee_dma_heap_alloc() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/core/ |
| H A 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/drivers/gpu/drm/nouveau/include/nvkm/core/ |
| H A 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/tools/include/nolibc/ |
| H A D | stdlib.h | 94 struct nolibc_heap *heap; in free() local 99 heap = container_of(ptr, struct nolibc_heap, user_p); in free() 100 munmap(heap, heap->len); in free() 131 struct nolibc_heap *heap; in malloc() local 134 len = sizeof(*heap) + len; in malloc() 136 heap = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, in malloc() 138 if (__builtin_expect(heap == MAP_FAILED, 0)) in malloc() 141 heap->len = len; in malloc() 142 return heap in malloc() 165 struct nolibc_heap *heap; realloc() local [all...] |
| /linux/drivers/gpu/drm/nouveau/nvif/ |
| H A D | mmu.c | 35 kfree(mmu->heap); in nvif_mmu_dtor() 53 mmu->heap = NULL; in nvif_mmu_ctor() 72 mmu->heap = kmalloc_objs(*mmu->heap, mmu->heap_nr); in nvif_mmu_ctor() 74 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/arch/powerpc/include/asm/ |
| H A 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/tools/perf/util/ |
| H A D | powerpc-vpadtl.c | 27 struct auxtrace_heap heap; 366 * of perf record with timestamp of top element in the auxtrace heap. 367 * Process the auxtrace queue if the timestamp of element from heap is 370 * Update the timestamp of the auxtrace heap with the timestamp in powerpc_vpadtl_process_queues() 383 if (!vpa->heap.heap_cnt) in powerpc_vpadtl_process_queues() 386 if (vpa->heap.heap_array[0].ordinal >= timestamp) in powerpc_vpadtl_process_queues() 389 queue_nr = vpa->heap.heap_array[0].queue_nr; in powerpc_vpadtl_process_queues() 393 auxtrace_heap__pop(&vpa->heap); in powerpc_vpadtl_process_queues() 395 if (vpa->heap.heap_cnt) { in powerpc_vpadtl_process_queues() 396 ts = vpa->heap in powerpc_vpadtl_process_queues() 26 struct auxtrace_heap heap; global() member [all...] |
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ |
| H A D | tu102.c | 239 meta->gspFwRsvdStart = gsp->fb.heap.addr; in tu102_gsp_wpr_meta_init() 240 meta->nonWprHeapOffset = gsp->fb.heap.addr; in tu102_gsp_wpr_meta_init() 241 meta->nonWprHeapSize = gsp->fb.heap.size; in tu102_gsp_wpr_meta_init() 243 meta->gspFwHeapOffset = gsp->fb.wpr2.heap.addr; in tu102_gsp_wpr_meta_init() 244 meta->gspFwHeapSize = gsp->fb.wpr2.heap.size; in tu102_gsp_wpr_meta_init() 385 gsp->fb.wpr2.heap.size = tu102_gsp_wpr_heap_size(gsp); 387 gsp->fb.wpr2.heap.addr = ALIGN_DOWN(gsp->fb.wpr2.elf.addr - gsp->fb.wpr2.heap.size, 0x100000); 388 gsp->fb.wpr2.heap.size = ALIGN_DOWN(gsp->fb.wpr2.elf.addr - gsp->fb.wpr2.heap [all...] |
| /linux/lib/zlib_deflate/ |
| H A 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 …]
|
| H A D | defutil.h | 30 /* maximum heap size */ 181 int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ member 182 int heap_len; /* number of elements in the heap */ 184 /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. 185 * The same heap array is used to build all trees.
|
| /linux/drivers/accel/amdxdna/ |
| H A D | amdxdna_gem.c | 28 * The dev BO could be across multiple heap BO chunks. The heap chunks should in amdxdna_gem_heap_alloc() 37 struct amdxdna_gem_obj *heap; in amdxdna_gem_heap_alloc() 42 XDNA_DBG(xdna, "Empty heap xa"); in amdxdna_gem_heap_alloc() 47 heap = xa_load(&client->dev_heap_xa, heap_id); in amdxdna_gem_heap_alloc() 48 if (!heap) { in amdxdna_gem_heap_alloc() 49 XDNA_ERR(xdna, "Failed to load heap %d", heap_id); in amdxdna_gem_heap_alloc() 52 heap_addr = amdxdna_gem_dev_addr(heap); in amdxdna_gem_heap_alloc() 58 heap = xa_load(&client->dev_heap_xa, heap_id); in amdxdna_gem_heap_alloc() 59 exp_heap_uva = amdxdna_gem_uva(heap); in amdxdna_gem_heap_alloc() 32 struct amdxdna_gem_obj *heap; amdxdna_gem_heap_alloc() local 80 struct amdxdna_gem_obj *heap; amdxdna_gem_heap_free() local 170 struct amdxdna_gem_obj *heap = abo->client->dev_heap; amdxdna_gem_uva() local [all...] |
| H A D | aie2_ctx.c | 93 struct amdxdna_gem_obj *heap = hwctx->priv->heap; in aie2_hwctx_restart() 104 amdxdna_obj_dma_addr(heap), in aie2_cmd_get_out_fence() 105 heap->mem.size); in aie2_cmd_get_out_fence() 111 xa_for_each_range(&hwctx->client->dev_heap_xa, heap_id, heap, 1, in aie2_cmd_get_out_fence() 114 amdxdna_obj_dma_addr(heap), in aie2_cmd_get_out_fence() 115 heap->mem.size); in aie2_cmd_get_out_fence() 117 XDNA_ERR(xdna, "Add heap %ld failed ret %d", heap_id, ret); in aie2_cmd_get_out_fence() 653 struct amdxdna_gem_obj *heap; in aie2_hwctx_init() 662 heap in aie2_hwctx_init() 72 struct amdxdna_gem_obj *heap = hwctx->priv->heap; aie2_hwctx_restart() local 616 struct amdxdna_gem_obj *heap; aie2_hwctx_init() local [all...] |
| /linux/kernel/sched/ |
| H A D | cpudeadline.c | 111 * @cp: the cpudl max-heap context 166 * cpudl_clear - remove a CPU from the cpudl max-heap 167 * @cp: the cpudl max-heap context 209 * cpudl_set - update the cpudl max-heap 210 * @cp: the cpudl max-heap context 246 * @cp: the cpudl max-heap context 272 * @cp: the cpudl max-heap context
|
| /linux/arch/x86/boot/ |
| H A D | main.c | 22 char *HEAP = _end; variable 23 char *heap_end = _end; /* Default end of heap = no heap */ 128 /* Boot protocol 2.00 only, no heap available */ in init_heap() 145 /* End of heap check */ in main()
|
| /linux/arch/mips/boot/compressed/ |
| H A D | head.S | 32 PTR_LA a0, (.heap) /* heap address */ 51 .comm .heap,BOOT_HEAP_SIZE,4
|
| /linux/include/uapi/drm/ |
| H A D | pvr_drm.h | 258 * enum drm_pvr_heap_id - Array index for heap info data returned by 266 /** @DRM_PVR_HEAP_GENERAL: General purpose heap. */ 268 /** @DRM_PVR_HEAP_PDS_CODE_DATA: PDS code and data heap. */ 270 /** @DRM_PVR_HEAP_USC_CODE: USC code heap. */ 272 /** @DRM_PVR_HEAP_RGNHDR: Region header heap. Only used if GPU has BRN63142. */ 274 /** @DRM_PVR_HEAP_VIS_TEST: Visibility test heap. */ 276 /** @DRM_PVR_HEAP_TRANSFER_FRAG: Transfer fragment heap. */ 291 * struct drm_pvr_heap - Container holding information about a single heap. 296 /** @base: Base address of heap. */ 299 /** @size: Size of heap, in bytes. Will be 0 if the heap is not present. */ [all …]
|
| /linux/include/linux/ |
| H A 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 113 * kfence_alloc() should be inserted into the heap allocation fast path, 134 * @addr: pointer to a heap object 161 * __kfence_free() - release a KFENCE heap object to KFENCE pool 171 * kfence_free() - try to release an arbitrary heap object to KFENCE pool
|
| /linux/drivers/md/bcache/ |
| H A D | util.h | 39 #define init_heap(heap, _size, gfp) \ argument 42 (heap)->used = 0; \ 43 (heap)->size = (_size); \ 44 _bytes = (heap)->size * sizeof(*(heap)->data); \ 45 (heap)->data = kvmalloc(_bytes, (gfp) & GFP_KERNEL); \ 46 (heap)->data; \ 49 #define free_heap(heap) \ argument 51 kvfree((heap)->data); \ 52 (heap)->data = NULL; \
|
| /linux/drivers/gpu/nova-core/gsp/ |
| H A D | fw.rs | 104 /// Empty type to group methods related to heap parameters for running the GSP firmware. 107 /// Minimum required alignment for the GSP heap. 111 /// Returns the amount of GSP-RM heap memory used during GSP-RM boot and initialization (up to in base_rm_size() 124 /// Returns the amount of heap memory required to support a single channel allocation. 144 /// Heap memory requirements and constraints for a given version of the GSP LIBOS. 146 /// The base amount of heap required by the GSP operating system, in bytes. 148 /// The minimum and maximum sizes allowed for the GSP FW heap, in bytes. 180 /// Returns the amount of memory (in bytes) to allocate for the WPR heap for a framebuffer size in wpr_heap_size() 183 // The WPR heap will contain the following: in wpr_heap_size() 193 // Clamp to the supported heap size [all...] |
| /linux/drivers/gpu/drm/lima/ |
| H A D | lima_gp.c | 37 dev_dbg(dev->dev, "%s out of heap irq status=%x\n", in lima_gp_irq_handler() 137 /* update real heap buffer size for GP */ in lima_gp_task_run() 148 task->heap = bo; in lima_gp_task_run() 253 if (fail_size == task->heap->heap_size) { in lima_gp_task_recover() 256 ret = lima_heap_alloc(task->heap, task->vm); in lima_gp_task_recover() 266 f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + task->heap->heap_size; in lima_gp_task_recover()
|