heap              369 arch/powerpc/mm/book3s64/slb.c 	unsigned long heap = mm->start_brk;
heap              392 arch/powerpc/mm/book3s64/slb.c 	if (heap && !is_kernel_addr(heap)) {
heap              393 arch/powerpc/mm/book3s64/slb.c 		if (preload_add(ti, heap))
heap              394 arch/powerpc/mm/book3s64/slb.c 			slb_allocate_user(mm, heap);
heap              340 arch/x86/boot/compressed/misc.c asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,
heap              380 arch/x86/boot/compressed/misc.c 	free_mem_ptr     = heap;	/* Heap */
heap              381 arch/x86/boot/compressed/misc.c 	free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
heap              423 arch/x86/boot/compressed/misc.c 	if (heap > 0x3fffffffffffUL)
heap              428 arch/x86/boot/compressed/misc.c 	if (heap > ((-__PAGE_OFFSET-(128<<20)-1) & 0x7fffffff))
heap               25 drivers/gpu/drm/nouveau/include/nvif/if0008.h 	__u8  heap;
heap               15 drivers/gpu/drm/nouveau/include/nvif/mmu.h 	} *heap;
heap               27 drivers/gpu/drm/nouveau/include/nvif/mmu.h 		u8 heap;
heap               21 drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h 	struct nvkm_mm heap;
heap               12 drivers/gpu/drm/nouveau/include/nvkm/core/mm.h 	u8  heap;
heap               34 drivers/gpu/drm/nouveau/include/nvkm/core/mm.h int  nvkm_mm_init(struct nvkm_mm *, u8 heap, u32 offset, u32 length, u32 block);
heap               36 drivers/gpu/drm/nouveau/include/nvkm/core/mm.h int  nvkm_mm_head(struct nvkm_mm *, u8 heap, u8 type, u32 size_max,
heap               38 drivers/gpu/drm/nouveau/include/nvkm/core/mm.h int  nvkm_mm_tail(struct nvkm_mm *, u8 heap, u8 type, u32 size_max,
heap               44 drivers/gpu/drm/nouveau/include/nvkm/core/mm.h nvkm_mm_heap_size(struct nvkm_mm *mm, u8 heap)
heap               49 drivers/gpu/drm/nouveau/include/nvkm/core/mm.h 		if (node->heap == heap)
heap              143 drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h nvkm_ram_get(struct nvkm_device *, u8 heap, u8 type, u8 page, u64 size,
heap              101 drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h 	} heap[4];
heap              110 drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h 		u8 heap;
heap              118 drivers/gpu/drm/nouveau/nouveau_abi16.c 	nvkm_mm_free(&chan->heap, &ntfy->node);
heap              145 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (chan->heap.block_size)
heap              146 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nvkm_mm_fini(&chan->heap);
heap              347 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = nvkm_mm_init(&chan->heap, 0, 0, PAGE_SIZE, 1);
heap              545 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = nvkm_mm_head(&chan->heap, 0, 1, info->size, info->size, 1,
heap               27 drivers/gpu/drm/nouveau/nouveau_abi16.h 	struct nvkm_mm  heap;
heap               32 drivers/gpu/drm/nouveau/nvif/mmu.c 	kfree(mmu->heap);
heap               49 drivers/gpu/drm/nouveau/nvif/mmu.c 	mmu->heap = NULL;
heap               68 drivers/gpu/drm/nouveau/nvif/mmu.c 	mmu->heap = kmalloc_array(mmu->heap_nr, sizeof(*mmu->heap),
heap               72 drivers/gpu/drm/nouveau/nvif/mmu.c 	if (ret = -ENOMEM, !mmu->heap || !mmu->type)
heap               88 drivers/gpu/drm/nouveau/nvif/mmu.c 		mmu->heap[i].size = args.size;
heap              108 drivers/gpu/drm/nouveau/nvif/mmu.c 		mmu->type[i].heap = args.heap;
heap              180 drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c 			ret = nvkm_mm_head(&parent->heap, 0, 1, size, size,
heap              183 drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c 			ret = nvkm_mm_tail(&parent->heap, 0, 1, size, size,
heap              211 drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c 	return nvkm_mm_init(&gpuobj->heap, 0, 0, gpuobj->size, 1);
heap              220 drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c 			nvkm_mm_free(&gpuobj->parent->heap, &gpuobj->node);
heap              221 drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c 		nvkm_mm_fini(&gpuobj->heap);
heap               99 drivers/gpu/drm/nouveau/nvkm/core/mm.c 	b->heap   = a->heap;
heap              111 drivers/gpu/drm/nouveau/nvkm/core/mm.c nvkm_mm_head(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min,
heap              122 drivers/gpu/drm/nouveau/nvkm/core/mm.c 		if (unlikely(heap != NVKM_MM_HEAP_ANY)) {
heap              123 drivers/gpu/drm/nouveau/nvkm/core/mm.c 			if (this->heap != heap)
heap              175 drivers/gpu/drm/nouveau/nvkm/core/mm.c 	b->heap    = a->heap;
heap              186 drivers/gpu/drm/nouveau/nvkm/core/mm.c nvkm_mm_tail(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min,
heap              198 drivers/gpu/drm/nouveau/nvkm/core/mm.c 		if (unlikely(heap != NVKM_MM_HEAP_ANY)) {
heap              199 drivers/gpu/drm/nouveau/nvkm/core/mm.c 			if (this->heap != heap)
heap              240 drivers/gpu/drm/nouveau/nvkm/core/mm.c nvkm_mm_init(struct nvkm_mm *mm, u8 heap, u32 offset, u32 length, u32 block)
heap              277 drivers/gpu/drm/nouveau/nvkm/core/mm.c 	node->heap = heap;
heap              104 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c nvkm_ram_get(struct nvkm_device *device, u8 heap, u8 type, u8 rpage, u64 size,
heap              133 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c 			ret = nvkm_mm_tail(mm, heap, type, max, min, align, &r);
heap              135 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c 			ret = nvkm_mm_head(mm, heap, type, max, min, align, &r);
heap               31 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c 	struct nvkm_mm heap;
heap              103 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c 	nvkm_mm_free(&iobj->imem->heap, &iobj->node);
heap              136 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c 	ret = nvkm_mm_head(&imem->heap, 0, 1, size, size,
heap              168 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c 	ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1);
heap              206 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c 	nvkm_mm_fini(&imem->heap);
heap               32 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c 	struct nvkm_mm heap;
heap              103 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c 	nvkm_mm_free(&iobj->imem->heap, &iobj->node);
heap              136 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c 	ret = nvkm_mm_head(&imem->heap, 0, 1, size, size,
heap              180 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c 	ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1);
heap              222 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c 	nvkm_mm_fini(&imem->heap);
heap              255 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c nvkm_mmu_type(struct nvkm_mmu *mmu, int heap, u8 type)
heap              257 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	if (heap >= 0 && !WARN_ON(mmu->type_nr == ARRAY_SIZE(mmu->type))) {
heap              258 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 		mmu->type[mmu->type_nr].type = type | mmu->heap[heap].type;
heap              259 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 		mmu->type[mmu->type_nr].heap = heap;
heap              268 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 		if (!WARN_ON(mmu->heap_nr == ARRAY_SIZE(mmu->heap))) {
heap              269 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 			mmu->heap[mmu->heap_nr].type = type;
heap              270 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 			mmu->heap[mmu->heap_nr].size = size;
heap              282 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	int heap;
heap              285 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	heap = nvkm_mmu_heap(mmu, NVKM_MEM_HOST, ~0ULL);
heap              286 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	nvkm_mmu_type(mmu, heap, type);
heap              296 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 		nvkm_mmu_type(mmu, heap, type & ~NVKM_MEM_KIND);
heap              298 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 		nvkm_mmu_type(mmu, heap, type);
heap              308 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 		nvkm_mmu_type(mmu, heap, type & ~NVKM_MEM_KIND);
heap              311 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	nvkm_mmu_type(mmu, heap, type |= NVKM_MEM_UNCACHED);
heap              323 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	u8 heap = NVKM_MEM_VRAM;
heap              327 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	heapM = nvkm_mmu_heap(mmu, heap, sizeM << NVKM_RAM_MM_SHIFT);
heap              329 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	heap |= NVKM_MEM_COMP;
heap              330 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	heap |= NVKM_MEM_DISP;
heap              331 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	heapN = nvkm_mmu_heap(mmu, heap, sizeN << NVKM_RAM_MM_SHIFT);
heap              332 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c 	heapU = nvkm_mmu_heap(mmu, heap, sizeU << NVKM_RAM_MM_SHIFT);
heap               69 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c 		args->v0.size = mmu->heap[index].size;
heap               90 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c 		args->v0.heap = mmu->type[index].heap;
heap             1217 drivers/gpu/drm/ttm/ttm_bo.c 		const struct ttm_place *heap = &places[i];
heap             1219 drivers/gpu/drm/ttm/ttm_bo.c 		if (mem->mm_node && (mem->start < heap->fpfn ||
heap             1220 drivers/gpu/drm/ttm/ttm_bo.c 		     (heap->lpfn != 0 && (mem->start + mem->num_pages) > heap->lpfn)))
heap             1223 drivers/gpu/drm/ttm/ttm_bo.c 		*new_flags = heap->flags;
heap              185 drivers/md/bcache/alloc.c 	ca->heap.used = 0;
heap              191 drivers/md/bcache/alloc.c 		if (!heap_full(&ca->heap))
heap              192 drivers/md/bcache/alloc.c 			heap_add(&ca->heap, b, bucket_max_cmp);
heap              193 drivers/md/bcache/alloc.c 		else if (bucket_max_cmp(b, heap_peek(&ca->heap))) {
heap              194 drivers/md/bcache/alloc.c 			ca->heap.data[0] = b;
heap              195 drivers/md/bcache/alloc.c 			heap_sift(&ca->heap, 0, bucket_max_cmp);
heap              199 drivers/md/bcache/alloc.c 	for (i = ca->heap.used / 2 - 1; i >= 0; --i)
heap              200 drivers/md/bcache/alloc.c 		heap_sift(&ca->heap, i, bucket_min_cmp);
heap              203 drivers/md/bcache/alloc.c 		if (!heap_pop(&ca->heap, b, bucket_min_cmp)) {
heap              447 drivers/md/bcache/bcache.h 	DECLARE_HEAP(struct bucket *, heap);
heap              194 drivers/md/bcache/movinggc.c 	return (b = heap_peek(&ca->heap)) ? GC_SECTORS_USED(b) : 0;
heap              213 drivers/md/bcache/movinggc.c 		ca->heap.used = 0;
heap              222 drivers/md/bcache/movinggc.c 			if (!heap_full(&ca->heap)) {
heap              224 drivers/md/bcache/movinggc.c 				heap_add(&ca->heap, b, bucket_cmp);
heap              225 drivers/md/bcache/movinggc.c 			} else if (bucket_cmp(b, heap_peek(&ca->heap))) {
heap              229 drivers/md/bcache/movinggc.c 				ca->heap.data[0] = b;
heap              230 drivers/md/bcache/movinggc.c 				heap_sift(&ca->heap, 0, bucket_cmp);
heap              235 drivers/md/bcache/movinggc.c 			heap_pop(&ca->heap, b, bucket_cmp);
heap              239 drivers/md/bcache/movinggc.c 		while (heap_pop(&ca->heap, b, bucket_cmp))
heap             2133 drivers/md/bcache/super.c 	free_heap(&ca->heap);
heap             2206 drivers/md/bcache/super.c 	if (!init_heap(&ca->heap, free << 3, GFP_KERNEL)) {
heap             2243 drivers/md/bcache/super.c 	free_heap(&ca->heap);
heap               42 drivers/md/bcache/util.h #define init_heap(heap, _size, gfp)					\
heap               45 drivers/md/bcache/util.h 	(heap)->used = 0;						\
heap               46 drivers/md/bcache/util.h 	(heap)->size = (_size);						\
heap               47 drivers/md/bcache/util.h 	_bytes = (heap)->size * sizeof(*(heap)->data);			\
heap               48 drivers/md/bcache/util.h 	(heap)->data = kvmalloc(_bytes, (gfp) & GFP_KERNEL);		\
heap               49 drivers/md/bcache/util.h 	(heap)->data;							\
heap               52 drivers/md/bcache/util.h #define free_heap(heap)							\
heap               54 drivers/md/bcache/util.h 	kvfree((heap)->data);						\
heap               55 drivers/md/bcache/util.h 	(heap)->data = NULL;						\
heap               33 drivers/staging/android/ion/ion.c static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
heap               45 drivers/staging/android/ion/ion.c 	buffer->heap = heap;
heap               50 drivers/staging/android/ion/ion.c 	ret = heap->ops->allocate(heap, buffer, len, flags);
heap               53 drivers/staging/android/ion/ion.c 		if (!(heap->flags & ION_HEAP_FLAG_DEFER_FREE))
heap               56 drivers/staging/android/ion/ion.c 		ion_heap_freelist_drain(heap, 0);
heap               57 drivers/staging/android/ion/ion.c 		ret = heap->ops->allocate(heap, buffer, len, flags);
heap               68 drivers/staging/android/ion/ion.c 	spin_lock(&heap->stat_lock);
heap               69 drivers/staging/android/ion/ion.c 	heap->num_of_buffers++;
heap               70 drivers/staging/android/ion/ion.c 	heap->num_of_alloc_bytes += len;
heap               71 drivers/staging/android/ion/ion.c 	if (heap->num_of_alloc_bytes > heap->alloc_bytes_wm)
heap               72 drivers/staging/android/ion/ion.c 		heap->alloc_bytes_wm = heap->num_of_alloc_bytes;
heap               73 drivers/staging/android/ion/ion.c 	spin_unlock(&heap->stat_lock);
heap               80 drivers/staging/android/ion/ion.c 	heap->ops->free(buffer);
heap               91 drivers/staging/android/ion/ion.c 		buffer->heap->ops->unmap_kernel(buffer->heap, buffer);
heap               93 drivers/staging/android/ion/ion.c 	buffer->heap->ops->free(buffer);
heap               94 drivers/staging/android/ion/ion.c 	spin_lock(&buffer->heap->stat_lock);
heap               95 drivers/staging/android/ion/ion.c 	buffer->heap->num_of_buffers--;
heap               96 drivers/staging/android/ion/ion.c 	buffer->heap->num_of_alloc_bytes -= buffer->size;
heap               97 drivers/staging/android/ion/ion.c 	spin_unlock(&buffer->heap->stat_lock);
heap              104 drivers/staging/android/ion/ion.c 	struct ion_heap *heap = buffer->heap;
heap              106 drivers/staging/android/ion/ion.c 	if (heap->flags & ION_HEAP_FLAG_DEFER_FREE)
heap              107 drivers/staging/android/ion/ion.c 		ion_heap_freelist_add(heap, buffer);
heap              120 drivers/staging/android/ion/ion.c 	vaddr = buffer->heap->ops->map_kernel(buffer->heap, buffer);
heap              135 drivers/staging/android/ion/ion.c 		buffer->heap->ops->unmap_kernel(buffer->heap, buffer);
heap              249 drivers/staging/android/ion/ion.c 	if (!buffer->heap->ops->map_user) {
heap              260 drivers/staging/android/ion/ion.c 	ret = buffer->heap->ops->map_user(buffer->heap, buffer, vma);
heap              300 drivers/staging/android/ion/ion.c 	if (buffer->heap->ops->map_kernel) {
heap              327 drivers/staging/android/ion/ion.c 	if (buffer->heap->ops->map_kernel) {
heap              360 drivers/staging/android/ion/ion.c 	struct ion_heap *heap;
heap              379 drivers/staging/android/ion/ion.c 	plist_for_each_entry(heap, &dev->heaps, node) {
heap              381 drivers/staging/android/ion/ion.c 		if (!((1 << heap->id) & heap_id_mask))
heap              383 drivers/staging/android/ion/ion.c 		buffer = ion_buffer_create(heap, dev, len, flags);
heap              418 drivers/staging/android/ion/ion.c 	struct ion_heap *heap;
heap              435 drivers/staging/android/ion/ion.c 	plist_for_each_entry(heap, &dev->heaps, node) {
heap              436 drivers/staging/android/ion/ion.c 		strncpy(hdata.name, heap->name, MAX_HEAP_NAME);
heap              438 drivers/staging/android/ion/ion.c 		hdata.type = heap->type;
heap              439 drivers/staging/android/ion/ion.c 		hdata.heap_id = heap->id;
heap              543 drivers/staging/android/ion/ion.c 	struct ion_heap *heap = data;
heap              551 drivers/staging/android/ion/ion.c 		objs = heap->shrinker.count_objects(&heap->shrinker, &sc);
heap              555 drivers/staging/android/ion/ion.c 	heap->shrinker.scan_objects(&heap->shrinker, &sc);
heap              561 drivers/staging/android/ion/ion.c 	struct ion_heap *heap = data;
heap              568 drivers/staging/android/ion/ion.c 	objs = heap->shrinker.count_objects(&heap->shrinker, &sc);
heap              576 drivers/staging/android/ion/ion.c void ion_device_add_heap(struct ion_heap *heap)
heap              583 drivers/staging/android/ion/ion.c 	if (!heap->ops->allocate || !heap->ops->free)
heap              587 drivers/staging/android/ion/ion.c 	spin_lock_init(&heap->free_lock);
heap              588 drivers/staging/android/ion/ion.c 	spin_lock_init(&heap->stat_lock);
heap              589 drivers/staging/android/ion/ion.c 	heap->free_list_size = 0;
heap              591 drivers/staging/android/ion/ion.c 	if (heap->flags & ION_HEAP_FLAG_DEFER_FREE)
heap              592 drivers/staging/android/ion/ion.c 		ion_heap_init_deferred_free(heap);
heap              594 drivers/staging/android/ion/ion.c 	if ((heap->flags & ION_HEAP_FLAG_DEFER_FREE) || heap->ops->shrink) {
heap              595 drivers/staging/android/ion/ion.c 		ret = ion_heap_init_shrinker(heap);
heap              600 drivers/staging/android/ion/ion.c 	heap->dev = dev;
heap              601 drivers/staging/android/ion/ion.c 	heap->num_of_buffers = 0;
heap              602 drivers/staging/android/ion/ion.c 	heap->num_of_alloc_bytes = 0;
heap              603 drivers/staging/android/ion/ion.c 	heap->alloc_bytes_wm = 0;
heap              605 drivers/staging/android/ion/ion.c 	heap_root = debugfs_create_dir(heap->name, dev->debug_root);
heap              608 drivers/staging/android/ion/ion.c 			   &heap->num_of_buffers);
heap              612 drivers/staging/android/ion/ion.c 			   &heap->num_of_alloc_bytes);
heap              616 drivers/staging/android/ion/ion.c 			   &heap->alloc_bytes_wm);
heap              618 drivers/staging/android/ion/ion.c 	if (heap->shrinker.count_objects &&
heap              619 drivers/staging/android/ion/ion.c 	    heap->shrinker.scan_objects) {
heap              620 drivers/staging/android/ion/ion.c 		snprintf(debug_name, 64, "%s_shrink", heap->name);
heap              624 drivers/staging/android/ion/ion.c 				    heap,
heap              629 drivers/staging/android/ion/ion.c 	heap->id = heap_id++;
heap              634 drivers/staging/android/ion/ion.c 	plist_node_init(&heap->node, -heap->id);
heap              635 drivers/staging/android/ion/ion.c 	plist_add(&heap->node, &dev->heaps);
heap               43 drivers/staging/android/ion/ion.h 	struct ion_heap *heap;
heap               86 drivers/staging/android/ion/ion.h 	int (*allocate)(struct ion_heap *heap,
heap               90 drivers/staging/android/ion/ion.h 	void * (*map_kernel)(struct ion_heap *heap, struct ion_buffer *buffer);
heap               91 drivers/staging/android/ion/ion.h 	void (*unmap_kernel)(struct ion_heap *heap, struct ion_buffer *buffer);
heap               94 drivers/staging/android/ion/ion.h 	int (*shrink)(struct ion_heap *heap, gfp_t gfp_mask, int nr_to_scan);
heap              169 drivers/staging/android/ion/ion.h void ion_device_add_heap(struct ion_heap *heap);
heap              175 drivers/staging/android/ion/ion.h void *ion_heap_map_kernel(struct ion_heap *heap, struct ion_buffer *buffer);
heap              176 drivers/staging/android/ion/ion.h void ion_heap_unmap_kernel(struct ion_heap *heap, struct ion_buffer *buffer);
heap              177 drivers/staging/android/ion/ion.h int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
heap              190 drivers/staging/android/ion/ion.h int ion_heap_init_shrinker(struct ion_heap *heap);
heap              200 drivers/staging/android/ion/ion.h int ion_heap_init_deferred_free(struct ion_heap *heap);
heap              209 drivers/staging/android/ion/ion.h void ion_heap_freelist_add(struct ion_heap *heap, struct ion_buffer *buffer);
heap              221 drivers/staging/android/ion/ion.h size_t ion_heap_freelist_drain(struct ion_heap *heap, size_t size);
heap              243 drivers/staging/android/ion/ion.h size_t ion_heap_freelist_shrink(struct ion_heap *heap,
heap              250 drivers/staging/android/ion/ion.h size_t ion_heap_freelist_size(struct ion_heap *heap);
heap               20 drivers/staging/android/ion/ion_cma_heap.c 	struct ion_heap heap;
heap               24 drivers/staging/android/ion/ion_cma_heap.c #define to_cma_heap(x) container_of(x, struct ion_cma_heap, heap)
heap               27 drivers/staging/android/ion/ion_cma_heap.c static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
heap               31 drivers/staging/android/ion/ion_cma_heap.c 	struct ion_cma_heap *cma_heap = to_cma_heap(heap);
heap               85 drivers/staging/android/ion/ion_cma_heap.c 	struct ion_cma_heap *cma_heap = to_cma_heap(buffer->heap);
heap              113 drivers/staging/android/ion/ion_cma_heap.c 	cma_heap->heap.ops = &ion_cma_ops;
heap              115 drivers/staging/android/ion/ion_cma_heap.c 	cma_heap->heap.type = ION_HEAP_TYPE_DMA;
heap              116 drivers/staging/android/ion/ion_cma_heap.c 	return &cma_heap->heap;
heap              121 drivers/staging/android/ion/ion_cma_heap.c 	struct ion_heap *heap;
heap              123 drivers/staging/android/ion/ion_cma_heap.c 	heap = __ion_cma_heap_create(cma);
heap              124 drivers/staging/android/ion/ion_cma_heap.c 	if (IS_ERR(heap))
heap              125 drivers/staging/android/ion/ion_cma_heap.c 		return PTR_ERR(heap);
heap              127 drivers/staging/android/ion/ion_cma_heap.c 	heap->name = cma_get_name(cma);
heap              129 drivers/staging/android/ion/ion_cma_heap.c 	ion_device_add_heap(heap);
heap               20 drivers/staging/android/ion/ion_heap.c void *ion_heap_map_kernel(struct ion_heap *heap,
heap               58 drivers/staging/android/ion/ion_heap.c void ion_heap_unmap_kernel(struct ion_heap *heap,
heap               64 drivers/staging/android/ion/ion_heap.c int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
heap              157 drivers/staging/android/ion/ion_heap.c void ion_heap_freelist_add(struct ion_heap *heap, struct ion_buffer *buffer)
heap              159 drivers/staging/android/ion/ion_heap.c 	spin_lock(&heap->free_lock);
heap              160 drivers/staging/android/ion/ion_heap.c 	list_add(&buffer->list, &heap->free_list);
heap              161 drivers/staging/android/ion/ion_heap.c 	heap->free_list_size += buffer->size;
heap              162 drivers/staging/android/ion/ion_heap.c 	spin_unlock(&heap->free_lock);
heap              163 drivers/staging/android/ion/ion_heap.c 	wake_up(&heap->waitqueue);
heap              166 drivers/staging/android/ion/ion_heap.c size_t ion_heap_freelist_size(struct ion_heap *heap)
heap              170 drivers/staging/android/ion/ion_heap.c 	spin_lock(&heap->free_lock);
heap              171 drivers/staging/android/ion/ion_heap.c 	size = heap->free_list_size;
heap              172 drivers/staging/android/ion/ion_heap.c 	spin_unlock(&heap->free_lock);
heap              177 drivers/staging/android/ion/ion_heap.c static size_t _ion_heap_freelist_drain(struct ion_heap *heap, size_t size,
heap              183 drivers/staging/android/ion/ion_heap.c 	if (ion_heap_freelist_size(heap) == 0)
heap              186 drivers/staging/android/ion/ion_heap.c 	spin_lock(&heap->free_lock);
heap              188 drivers/staging/android/ion/ion_heap.c 		size = heap->free_list_size;
heap              190 drivers/staging/android/ion/ion_heap.c 	while (!list_empty(&heap->free_list)) {
heap              193 drivers/staging/android/ion/ion_heap.c 		buffer = list_first_entry(&heap->free_list, struct ion_buffer,
heap              196 drivers/staging/android/ion/ion_heap.c 		heap->free_list_size -= buffer->size;
heap              200 drivers/staging/android/ion/ion_heap.c 		spin_unlock(&heap->free_lock);
heap              202 drivers/staging/android/ion/ion_heap.c 		spin_lock(&heap->free_lock);
heap              204 drivers/staging/android/ion/ion_heap.c 	spin_unlock(&heap->free_lock);
heap              209 drivers/staging/android/ion/ion_heap.c size_t ion_heap_freelist_drain(struct ion_heap *heap, size_t size)
heap              211 drivers/staging/android/ion/ion_heap.c 	return _ion_heap_freelist_drain(heap, size, false);
heap              214 drivers/staging/android/ion/ion_heap.c size_t ion_heap_freelist_shrink(struct ion_heap *heap, size_t size)
heap              216 drivers/staging/android/ion/ion_heap.c 	return _ion_heap_freelist_drain(heap, size, true);
heap              221 drivers/staging/android/ion/ion_heap.c 	struct ion_heap *heap = data;
heap              226 drivers/staging/android/ion/ion_heap.c 		wait_event_freezable(heap->waitqueue,
heap              227 drivers/staging/android/ion/ion_heap.c 				     ion_heap_freelist_size(heap) > 0);
heap              229 drivers/staging/android/ion/ion_heap.c 		spin_lock(&heap->free_lock);
heap              230 drivers/staging/android/ion/ion_heap.c 		if (list_empty(&heap->free_list)) {
heap              231 drivers/staging/android/ion/ion_heap.c 			spin_unlock(&heap->free_lock);
heap              234 drivers/staging/android/ion/ion_heap.c 		buffer = list_first_entry(&heap->free_list, struct ion_buffer,
heap              237 drivers/staging/android/ion/ion_heap.c 		heap->free_list_size -= buffer->size;
heap              238 drivers/staging/android/ion/ion_heap.c 		spin_unlock(&heap->free_lock);
heap              245 drivers/staging/android/ion/ion_heap.c int ion_heap_init_deferred_free(struct ion_heap *heap)
heap              249 drivers/staging/android/ion/ion_heap.c 	INIT_LIST_HEAD(&heap->free_list);
heap              250 drivers/staging/android/ion/ion_heap.c 	init_waitqueue_head(&heap->waitqueue);
heap              251 drivers/staging/android/ion/ion_heap.c 	heap->task = kthread_run(ion_heap_deferred_free, heap,
heap              252 drivers/staging/android/ion/ion_heap.c 				 "%s", heap->name);
heap              253 drivers/staging/android/ion/ion_heap.c 	if (IS_ERR(heap->task)) {
heap              256 drivers/staging/android/ion/ion_heap.c 		return PTR_ERR_OR_ZERO(heap->task);
heap              258 drivers/staging/android/ion/ion_heap.c 	sched_setscheduler(heap->task, SCHED_IDLE, &param);
heap              266 drivers/staging/android/ion/ion_heap.c 	struct ion_heap *heap = container_of(shrinker, struct ion_heap,
heap              270 drivers/staging/android/ion/ion_heap.c 	total = ion_heap_freelist_size(heap) / PAGE_SIZE;
heap              272 drivers/staging/android/ion/ion_heap.c 	if (heap->ops->shrink)
heap              273 drivers/staging/android/ion/ion_heap.c 		total += heap->ops->shrink(heap, sc->gfp_mask, 0);
heap              281 drivers/staging/android/ion/ion_heap.c 	struct ion_heap *heap = container_of(shrinker, struct ion_heap,
heap              293 drivers/staging/android/ion/ion_heap.c 	if (heap->flags & ION_HEAP_FLAG_DEFER_FREE)
heap              294 drivers/staging/android/ion/ion_heap.c 		freed = ion_heap_freelist_shrink(heap, to_scan * PAGE_SIZE) /
heap              301 drivers/staging/android/ion/ion_heap.c 	if (heap->ops->shrink)
heap              302 drivers/staging/android/ion/ion_heap.c 		freed += heap->ops->shrink(heap, sc->gfp_mask, to_scan);
heap              307 drivers/staging/android/ion/ion_heap.c int ion_heap_init_shrinker(struct ion_heap *heap)
heap              309 drivers/staging/android/ion/ion_heap.c 	heap->shrinker.count_objects = ion_heap_shrink_count;
heap              310 drivers/staging/android/ion/ion_heap.c 	heap->shrinker.scan_objects = ion_heap_shrink_scan;
heap              311 drivers/staging/android/ion/ion_heap.c 	heap->shrinker.seeks = DEFAULT_SEEKS;
heap              312 drivers/staging/android/ion/ion_heap.c 	heap->shrinker.batch = 0;
heap              314 drivers/staging/android/ion/ion_heap.c 	return register_shrinker(&heap->shrinker);
heap               43 drivers/staging/android/ion/ion_system_heap.c 	struct ion_heap heap;
heap               47 drivers/staging/android/ion/ion_system_heap.c static struct page *alloc_buffer_page(struct ion_system_heap *heap,
heap               51 drivers/staging/android/ion/ion_system_heap.c 	struct ion_page_pool *pool = heap->pools[order_to_index(order)];
heap               56 drivers/staging/android/ion/ion_system_heap.c static void free_buffer_page(struct ion_system_heap *heap,
heap               68 drivers/staging/android/ion/ion_system_heap.c 	pool = heap->pools[order_to_index(order)];
heap               73 drivers/staging/android/ion/ion_system_heap.c static struct page *alloc_largest_available(struct ion_system_heap *heap,
heap               87 drivers/staging/android/ion/ion_system_heap.c 		page = alloc_buffer_page(heap, buffer, orders[i]);
heap               97 drivers/staging/android/ion/ion_system_heap.c static int ion_system_heap_allocate(struct ion_heap *heap,
heap              102 drivers/staging/android/ion/ion_system_heap.c 	struct ion_system_heap *sys_heap = container_of(heap,
heap              104 drivers/staging/android/ion/ion_system_heap.c 							heap);
heap              154 drivers/staging/android/ion/ion_system_heap.c 	struct ion_system_heap *sys_heap = container_of(buffer->heap,
heap              156 drivers/staging/android/ion/ion_system_heap.c 							heap);
heap              171 drivers/staging/android/ion/ion_system_heap.c static int ion_system_heap_shrink(struct ion_heap *heap, gfp_t gfp_mask,
heap              180 drivers/staging/android/ion/ion_system_heap.c 	sys_heap = container_of(heap, struct ion_system_heap, heap);
heap              250 drivers/staging/android/ion/ion_system_heap.c 	struct ion_system_heap *heap;
heap              252 drivers/staging/android/ion/ion_system_heap.c 	heap = kzalloc(sizeof(*heap), GFP_KERNEL);
heap              253 drivers/staging/android/ion/ion_system_heap.c 	if (!heap)
heap              255 drivers/staging/android/ion/ion_system_heap.c 	heap->heap.ops = &system_heap_ops;
heap              256 drivers/staging/android/ion/ion_system_heap.c 	heap->heap.type = ION_HEAP_TYPE_SYSTEM;
heap              257 drivers/staging/android/ion/ion_system_heap.c 	heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE;
heap              259 drivers/staging/android/ion/ion_system_heap.c 	if (ion_system_heap_create_pools(heap->pools))
heap              262 drivers/staging/android/ion/ion_system_heap.c 	return &heap->heap;
heap              265 drivers/staging/android/ion/ion_system_heap.c 	kfree(heap);
heap              271 drivers/staging/android/ion/ion_system_heap.c 	struct ion_heap *heap;
heap              273 drivers/staging/android/ion/ion_system_heap.c 	heap = __ion_system_heap_create();
heap              274 drivers/staging/android/ion/ion_system_heap.c 	if (IS_ERR(heap))
heap              275 drivers/staging/android/ion/ion_system_heap.c 		return PTR_ERR(heap);
heap              276 drivers/staging/android/ion/ion_system_heap.c 	heap->name = "ion_system_heap";
heap              278 drivers/staging/android/ion/ion_system_heap.c 	ion_device_add_heap(heap);
heap              284 drivers/staging/android/ion/ion_system_heap.c static int ion_system_contig_heap_allocate(struct ion_heap *heap,
heap              353 drivers/staging/android/ion/ion_system_heap.c 	struct ion_heap *heap;
heap              355 drivers/staging/android/ion/ion_system_heap.c 	heap = kzalloc(sizeof(*heap), GFP_KERNEL);
heap              356 drivers/staging/android/ion/ion_system_heap.c 	if (!heap)
heap              358 drivers/staging/android/ion/ion_system_heap.c 	heap->ops = &kmalloc_ops;
heap              359 drivers/staging/android/ion/ion_system_heap.c 	heap->type = ION_HEAP_TYPE_SYSTEM_CONTIG;
heap              360 drivers/staging/android/ion/ion_system_heap.c 	heap->name = "ion_system_contig_heap";
heap              362 drivers/staging/android/ion/ion_system_heap.c 	return heap;
heap              367 drivers/staging/android/ion/ion_system_heap.c 	struct ion_heap *heap;
heap              369 drivers/staging/android/ion/ion_system_heap.c 	heap = __ion_system_contig_heap_create();
heap              370 drivers/staging/android/ion/ion_system_heap.c 	if (IS_ERR(heap))
heap              371 drivers/staging/android/ion/ion_system_heap.c 		return PTR_ERR(heap);
heap              373 drivers/staging/android/ion/ion_system_heap.c 	ion_device_add_heap(heap);
heap              887 fs/ubifs/debug.c void ubifs_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat)
heap              892 fs/ubifs/debug.c 	       current->pid, cat, heap->cnt);
heap              893 fs/ubifs/debug.c 	for (i = 0; i < heap->cnt; i++) {
heap              894 fs/ubifs/debug.c 		struct ubifs_lprops *lprops = heap->arr[i];
heap              258 fs/ubifs/debug.h void ubifs_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap,
heap              284 fs/ubifs/debug.h void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
heap               45 fs/ubifs/find.c 	struct ubifs_lpt_heap *heap;
heap               51 fs/ubifs/find.c 		heap = &c->lpt_heap[cat - 1];
heap               52 fs/ubifs/find.c 		if (heap->cnt < heap->max_cnt)
heap              129 fs/ubifs/find.c 	struct ubifs_lpt_heap *heap;
heap              134 fs/ubifs/find.c 	heap = &c->lpt_heap[LPROPS_FREE - 1];
heap              135 fs/ubifs/find.c 	for (i = 0; i < heap->cnt; i++) {
heap              136 fs/ubifs/find.c 		lprops = heap->arr[i];
heap              226 fs/ubifs/find.c 	struct ubifs_lpt_heap *heap, *idx_heap;
heap              272 fs/ubifs/find.c 	heap = &c->lpt_heap[LPROPS_DIRTY - 1];
heap              292 fs/ubifs/find.c 	if (heap->cnt) {
heap              293 fs/ubifs/find.c 		lp = heap->arr[0];
heap              400 fs/ubifs/find.c 	struct ubifs_lpt_heap *heap;
heap              420 fs/ubifs/find.c 	heap = &c->lpt_heap[LPROPS_DIRTY - 1];
heap              421 fs/ubifs/find.c 	for (i = 0; i < heap->cnt; i++) {
heap              422 fs/ubifs/find.c 		lprops = heap->arr[i];
heap              819 fs/ubifs/find.c 	struct ubifs_lpt_heap *heap;
heap              825 fs/ubifs/find.c 	heap = &c->lpt_heap[LPROPS_DIRTY_IDX - 1];
heap              826 fs/ubifs/find.c 	for (i = 0; i < heap->cnt; i++) {
heap              827 fs/ubifs/find.c 		lprops = heap->arr[i];
heap               50 fs/ubifs/lprops.c static void move_up_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap,
heap               63 fs/ubifs/lprops.c 		val2 = get_heap_comp_val(heap->arr[ppos], cat);
heap               67 fs/ubifs/lprops.c 		heap->arr[ppos]->hpos = hpos;
heap               68 fs/ubifs/lprops.c 		heap->arr[hpos] = heap->arr[ppos];
heap               69 fs/ubifs/lprops.c 		heap->arr[ppos] = lprops;
heap               87 fs/ubifs/lprops.c static void adjust_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap,
heap               97 fs/ubifs/lprops.c 		val2 = get_heap_comp_val(heap->arr[ppos], cat);
heap              101 fs/ubifs/lprops.c 				heap->arr[ppos]->hpos = hpos;
heap              102 fs/ubifs/lprops.c 				heap->arr[hpos] = heap->arr[ppos];
heap              103 fs/ubifs/lprops.c 				heap->arr[ppos] = lprops;
heap              109 fs/ubifs/lprops.c 				val2 = get_heap_comp_val(heap->arr[ppos], cat);
heap              121 fs/ubifs/lprops.c 		if (cpos >= heap->cnt)
heap              123 fs/ubifs/lprops.c 		val2 = get_heap_comp_val(heap->arr[cpos], cat);
heap              126 fs/ubifs/lprops.c 			if (cpos + 1 < heap->cnt) {
heap              127 fs/ubifs/lprops.c 				val3 = get_heap_comp_val(heap->arr[cpos + 1],
heap              132 fs/ubifs/lprops.c 			heap->arr[cpos]->hpos = hpos;
heap              133 fs/ubifs/lprops.c 			heap->arr[hpos] = heap->arr[cpos];
heap              134 fs/ubifs/lprops.c 			heap->arr[cpos] = lprops;
heap              141 fs/ubifs/lprops.c 		if (cpos >= heap->cnt)
heap              143 fs/ubifs/lprops.c 		val3 = get_heap_comp_val(heap->arr[cpos], cat);
heap              146 fs/ubifs/lprops.c 			heap->arr[cpos]->hpos = hpos;
heap              147 fs/ubifs/lprops.c 			heap->arr[hpos] = heap->arr[cpos];
heap              148 fs/ubifs/lprops.c 			heap->arr[cpos] = lprops;
heap              169 fs/ubifs/lprops.c 	struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
heap              171 fs/ubifs/lprops.c 	if (heap->cnt >= heap->max_cnt) {
heap              180 fs/ubifs/lprops.c 		ubifs_assert(c, cpos < heap->cnt);
heap              183 fs/ubifs/lprops.c 		val2 = get_heap_comp_val(heap->arr[cpos], cat);
heap              187 fs/ubifs/lprops.c 			lp = heap->arr[cpos];
heap              192 fs/ubifs/lprops.c 			heap->arr[cpos] = lprops;
heap              193 fs/ubifs/lprops.c 			move_up_lpt_heap(c, heap, lprops, cat);
heap              194 fs/ubifs/lprops.c 			dbg_check_heap(c, heap, cat, lprops->hpos);
heap              197 fs/ubifs/lprops.c 		dbg_check_heap(c, heap, cat, -1);
heap              200 fs/ubifs/lprops.c 		lprops->hpos = heap->cnt++;
heap              201 fs/ubifs/lprops.c 		heap->arr[lprops->hpos] = lprops;
heap              202 fs/ubifs/lprops.c 		move_up_lpt_heap(c, heap, lprops, cat);
heap              203 fs/ubifs/lprops.c 		dbg_check_heap(c, heap, cat, lprops->hpos);
heap              217 fs/ubifs/lprops.c 	struct ubifs_lpt_heap *heap;
heap              220 fs/ubifs/lprops.c 	heap = &c->lpt_heap[cat - 1];
heap              221 fs/ubifs/lprops.c 	ubifs_assert(c, hpos >= 0 && hpos < heap->cnt);
heap              222 fs/ubifs/lprops.c 	ubifs_assert(c, heap->arr[hpos] == lprops);
heap              223 fs/ubifs/lprops.c 	heap->cnt -= 1;
heap              224 fs/ubifs/lprops.c 	if (hpos < heap->cnt) {
heap              225 fs/ubifs/lprops.c 		heap->arr[hpos] = heap->arr[heap->cnt];
heap              226 fs/ubifs/lprops.c 		heap->arr[hpos]->hpos = hpos;
heap              227 fs/ubifs/lprops.c 		adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat);
heap              229 fs/ubifs/lprops.c 	dbg_check_heap(c, heap, cat, -1);
heap              246 fs/ubifs/lprops.c 	struct ubifs_lpt_heap *heap;
heap              249 fs/ubifs/lprops.c 	heap = &c->lpt_heap[cat - 1];
heap              250 fs/ubifs/lprops.c 	heap->arr[hpos] = new_lprops;
heap              442 fs/ubifs/lprops.c 		struct ubifs_lpt_heap *heap;
heap              447 fs/ubifs/lprops.c 		heap = &c->lpt_heap[new_cat - 1];
heap              448 fs/ubifs/lprops.c 		adjust_lpt_heap(c, heap, lprops, lprops->hpos, new_cat);
heap              757 fs/ubifs/lprops.c 	struct ubifs_lpt_heap *heap;
heap              761 fs/ubifs/lprops.c 	heap = &c->lpt_heap[LPROPS_FREE - 1];
heap              762 fs/ubifs/lprops.c 	if (heap->cnt == 0)
heap              765 fs/ubifs/lprops.c 	lprops = heap->arr[0];
heap              928 fs/ubifs/lprops.c 		struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
heap              930 fs/ubifs/lprops.c 		for (i = 0; i < heap->cnt; i++) {
heap              931 fs/ubifs/lprops.c 			lprops = heap->arr[i];
heap              950 fs/ubifs/lprops.c void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
heap              958 fs/ubifs/lprops.c 	for (i = 0; i < heap->cnt; i++) {
heap              959 fs/ubifs/lprops.c 		struct ubifs_lprops *lprops = heap->arr[i];
heap              984 fs/ubifs/lprops.c 			lp = heap->arr[j];
heap              999 fs/ubifs/lprops.c 		ubifs_dump_heap(c, heap, cat);
heap             1071 fs/ubifs/lprops.c 		struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1];
heap             1073 fs/ubifs/lprops.c 		if ((lp->hpos != -1 && heap->arr[lp->hpos]->lnum != lnum) ||
heap             1074 fs/ubifs/lprops.c 		    lp != heap->arr[lp->hpos]) {
heap             2265 fs/ubifs/lpt.c 		struct ubifs_lpt_heap *heap;
heap             2327 fs/ubifs/lpt.c 			heap = &c->lpt_heap[cat - 1];
heap             2328 fs/ubifs/lpt.c 			if (lprops->hpos < heap->cnt &&
heap             2329 fs/ubifs/lpt.c 			    heap->arr[lprops->hpos] == lprops)
heap              764 fs/ubifs/lpt_commit.c 	struct ubifs_lpt_heap *heap;
heap              791 fs/ubifs/lpt_commit.c 	heap = &c->lpt_heap[LPROPS_DIRTY_IDX - 1];
heap              792 fs/ubifs/lpt_commit.c 	for (i = 0; i < heap->cnt; i++) {
heap              793 fs/ubifs/lpt_commit.c 		c->lsave[cnt++] = heap->arr[i]->lnum;
heap              797 fs/ubifs/lpt_commit.c 	heap = &c->lpt_heap[LPROPS_DIRTY - 1];
heap              798 fs/ubifs/lpt_commit.c 	for (i = 0; i < heap->cnt; i++) {
heap              799 fs/ubifs/lpt_commit.c 		c->lsave[cnt++] = heap->arr[i]->lnum;
heap              803 fs/ubifs/lpt_commit.c 	heap = &c->lpt_heap[LPROPS_FREE - 1];
heap              804 fs/ubifs/lpt_commit.c 	for (i = 0; i < heap->cnt; i++) {
heap              805 fs/ubifs/lpt_commit.c 		c->lsave[cnt++] = heap->arr[i]->lnum;
heap             1968 fs/ubifs/lpt_commit.c 	struct ubifs_lpt_heap *heap;
heap             1986 fs/ubifs/lpt_commit.c 	heap = &c->lpt_heap[LPROPS_DIRTY_IDX - 1];
heap             1987 fs/ubifs/lpt_commit.c 	for (i = 0; i < heap->cnt; i++)
heap             1988 fs/ubifs/lpt_commit.c 		c->lsave[prandom_u32() % c->lsave_cnt] = heap->arr[i]->lnum;
heap             1989 fs/ubifs/lpt_commit.c 	heap = &c->lpt_heap[LPROPS_DIRTY - 1];
heap             1990 fs/ubifs/lpt_commit.c 	for (i = 0; i < heap->cnt; i++)
heap             1991 fs/ubifs/lpt_commit.c 		c->lsave[prandom_u32() % c->lsave_cnt] = heap->arr[i]->lnum;
heap             1992 fs/ubifs/lpt_commit.c 	heap = &c->lpt_heap[LPROPS_FREE - 1];
heap             1993 fs/ubifs/lpt_commit.c 	for (i = 0; i < heap->cnt; i++)
heap             1994 fs/ubifs/lpt_commit.c 		c->lsave[prandom_u32() % c->lsave_cnt] = heap->arr[i]->lnum;
heap              352 lib/zlib_deflate/deftree.c     top = s->heap[SMALLEST]; \
heap              353 lib/zlib_deflate/deftree.c     s->heap[SMALLEST] = s->heap[s->heap_len--]; \
heap              377 lib/zlib_deflate/deftree.c     int v = s->heap[k];
heap              382 lib/zlib_deflate/deftree.c             smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
heap              386 lib/zlib_deflate/deftree.c         if (smaller(tree, v, s->heap[j], s->depth)) break;
heap              389 lib/zlib_deflate/deftree.c         s->heap[k] = s->heap[j];  k = j;
heap              394 lib/zlib_deflate/deftree.c     s->heap[k] = v;
heap              430 lib/zlib_deflate/deftree.c     tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
heap              433 lib/zlib_deflate/deftree.c         n = s->heap[h];
heap              474 lib/zlib_deflate/deftree.c             m = s->heap[--h];
heap              558 lib/zlib_deflate/deftree.c             s->heap[++(s->heap_len)] = max_code = n;
heap              571 lib/zlib_deflate/deftree.c         node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
heap              590 lib/zlib_deflate/deftree.c         m = s->heap[SMALLEST]; /* m = node of next least frequency */
heap              592 lib/zlib_deflate/deftree.c         s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
heap              593 lib/zlib_deflate/deftree.c         s->heap[--(s->heap_max)] = m;
heap              606 lib/zlib_deflate/deftree.c         s->heap[SMALLEST] = node++;
heap              611 lib/zlib_deflate/deftree.c     s->heap[--(s->heap_max)] = s->heap[SMALLEST];
heap              179 lib/zlib_deflate/defutil.h     int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
heap               31 tools/perf/util/arm-spe.c 	struct auxtrace_heap		heap;
heap              173 tools/perf/util/arm-spe.c 	auxtrace_heap__free(&spe->heap);
heap              440 tools/perf/util/auxtrace.c int auxtrace_heap__add(struct auxtrace_heap *heap, unsigned int queue_nr,
heap              445 tools/perf/util/auxtrace.c 	if (queue_nr >= heap->heap_sz) {
heap              450 tools/perf/util/auxtrace.c 		heap_array = realloc(heap->heap_array,
heap              454 tools/perf/util/auxtrace.c 		heap->heap_array = heap_array;
heap              455 tools/perf/util/auxtrace.c 		heap->heap_sz = heap_sz;
heap              458 tools/perf/util/auxtrace.c 	auxtrace_heapify(heap->heap_array, heap->heap_cnt++, queue_nr, ordinal);
heap              463 tools/perf/util/auxtrace.c void auxtrace_heap__free(struct auxtrace_heap *heap)
heap              465 tools/perf/util/auxtrace.c 	zfree(&heap->heap_array);
heap              466 tools/perf/util/auxtrace.c 	heap->heap_cnt = 0;
heap              467 tools/perf/util/auxtrace.c 	heap->heap_sz = 0;
heap              470 tools/perf/util/auxtrace.c void auxtrace_heap__pop(struct auxtrace_heap *heap)
heap              472 tools/perf/util/auxtrace.c 	unsigned int pos, last, heap_cnt = heap->heap_cnt;
heap              478 tools/perf/util/auxtrace.c 	heap->heap_cnt -= 1;
heap              480 tools/perf/util/auxtrace.c 	heap_array = heap->heap_array;
heap              475 tools/perf/util/auxtrace.h int auxtrace_heap__add(struct auxtrace_heap *heap, unsigned int queue_nr,
heap              477 tools/perf/util/auxtrace.h void auxtrace_heap__pop(struct auxtrace_heap *heap);
heap              478 tools/perf/util/auxtrace.h void auxtrace_heap__free(struct auxtrace_heap *heap);
heap               45 tools/perf/util/cs-etm.c 	struct auxtrace_heap heap;
heap              823 tools/perf/util/cs-etm.c 	ret = auxtrace_heap__add(&etm->heap, cs_queue_nr, timestamp);
heap             2101 tools/perf/util/cs-etm.c 		if (!etm->heap.heap_cnt)
heap             2105 tools/perf/util/cs-etm.c 		cs_queue_nr = etm->heap.heap_array[0].queue_nr;
heap             2115 tools/perf/util/cs-etm.c 		auxtrace_heap__pop(&etm->heap);
heap             2182 tools/perf/util/cs-etm.c 		ret = auxtrace_heap__add(&etm->heap, cs_queue_nr, timestamp);
heap               47 tools/perf/util/intel-bts.c 	struct auxtrace_heap		heap;
heap              196 tools/perf/util/intel-bts.c 		ret = auxtrace_heap__add(&bts->heap, queue_nr,
heap              561 tools/perf/util/intel-bts.c 		if (!bts->heap.heap_cnt)
heap              564 tools/perf/util/intel-bts.c 		if (bts->heap.heap_array[0].ordinal > timestamp)
heap              567 tools/perf/util/intel-bts.c 		queue_nr = bts->heap.heap_array[0].queue_nr;
heap              571 tools/perf/util/intel-bts.c 		auxtrace_heap__pop(&bts->heap);
heap              575 tools/perf/util/intel-bts.c 			auxtrace_heap__add(&bts->heap, queue_nr, ts);
heap              580 tools/perf/util/intel-bts.c 			ret = auxtrace_heap__add(&bts->heap, queue_nr, ts);
heap              725 tools/perf/util/intel-bts.c 	auxtrace_heap__free(&bts->heap);
heap               56 tools/perf/util/intel-pt.c 	struct auxtrace_heap heap;
heap             1111 tools/perf/util/intel-pt.c 		ret = auxtrace_heap__add(&pt->heap, queue_nr, ptq->timestamp);
heap             2258 tools/perf/util/intel-pt.c 		if (!pt->heap.heap_cnt)
heap             2261 tools/perf/util/intel-pt.c 		if (pt->heap.heap_array[0].ordinal >= timestamp)
heap             2264 tools/perf/util/intel-pt.c 		queue_nr = pt->heap.heap_array[0].queue_nr;
heap             2269 tools/perf/util/intel-pt.c 			     queue_nr, pt->heap.heap_array[0].ordinal,
heap             2272 tools/perf/util/intel-pt.c 		auxtrace_heap__pop(&pt->heap);
heap             2274 tools/perf/util/intel-pt.c 		if (pt->heap.heap_cnt) {
heap             2275 tools/perf/util/intel-pt.c 			ts = pt->heap.heap_array[0].ordinal + 1;
heap             2287 tools/perf/util/intel-pt.c 			auxtrace_heap__add(&pt->heap, queue_nr, ts);
heap             2292 tools/perf/util/intel-pt.c 			ret = auxtrace_heap__add(&pt->heap, queue_nr, ts);
heap             2382 tools/perf/util/intel-pt.c 			err = auxtrace_heap__add(&pt->heap, ptq->queue_nr,
heap             2630 tools/perf/util/intel-pt.c 	auxtrace_heap__free(&pt->heap);
heap              170 tools/perf/util/s390-cpumsf.c 	struct auxtrace_heap	heap;
heap              816 tools/perf/util/s390-cpumsf.c 	return auxtrace_heap__add(&sf->heap, queue_nr, ts);
heap              852 tools/perf/util/s390-cpumsf.c 		if (!sf->heap.heap_cnt)
heap              855 tools/perf/util/s390-cpumsf.c 		if (sf->heap.heap_array[0].ordinal >= timestamp)
heap              858 tools/perf/util/s390-cpumsf.c 		queue_nr = sf->heap.heap_array[0].queue_nr;
heap              862 tools/perf/util/s390-cpumsf.c 		auxtrace_heap__pop(&sf->heap);
heap              863 tools/perf/util/s390-cpumsf.c 		if (sf->heap.heap_cnt) {
heap              864 tools/perf/util/s390-cpumsf.c 			ts = sf->heap.heap_array[0].ordinal + 1;
heap              873 tools/perf/util/s390-cpumsf.c 			auxtrace_heap__add(&sf->heap, queue_nr, ts);
heap              877 tools/perf/util/s390-cpumsf.c 			ret = auxtrace_heap__add(&sf->heap, queue_nr, ts);
heap             1043 tools/perf/util/s390-cpumsf.c 	auxtrace_heap__free(&sf->heap);