MLIR-AIE
Classes | Macros | Enumerations
ion.h File Reference
#include <linux/ioctl.h>
#include <linux/types.h>
+ Include dependency graph for ion.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ion_allocation_data
 DOC: Ion Userspace API. More...
 
struct  ion_heap_data
 struct ion_heap_data - data about a heap More...
 
struct  ion_heap_query
 struct ion_heap_query - collection of data about all heaps More...
 

Macros

#define ION_NUM_HEAP_IDS   (sizeof(unsigned int) * 8)
 
#define ION_FLAG_CACHED   1
 allocation flags - the lower 16 bits are used by core ion, the upper 16 bits are reserved for use by the heaps themselves.
 
#define MAX_HEAP_NAME   32
 
#define ION_IOC_MAGIC   'I'
 
#define ION_IOC_ALLOC   _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
 DOC: ION_IOC_ALLOC - allocate memory.
 
#define ION_IOC_HEAP_QUERY   _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query)
 DOC: ION_IOC_HEAP_QUERY - information about available heaps.
 

Enumerations

enum  ion_heap_type {
  ION_HEAP_TYPE_SYSTEM , ION_HEAP_TYPE_SYSTEM_CONTIG , ION_HEAP_TYPE_CARVEOUT , ION_HEAP_TYPE_CHUNK ,
  ION_HEAP_TYPE_DMA , ION_HEAP_TYPE_CUSTOM
}
 enum ion_heap_types - list of all possible types of heaps More...
 

Macro Definition Documentation

◆ ION_FLAG_CACHED

#define ION_FLAG_CACHED   1

allocation flags - the lower 16 bits are used by core ion, the upper 16 bits are reserved for use by the heaps themselves.

Definition at line 37 of file ion.h.

◆ ION_IOC_ALLOC

#define ION_IOC_ALLOC   _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)

DOC: ION_IOC_ALLOC - allocate memory.

Takes an ion_allocation_data struct and returns it with the handle field populated with the opaque handle for the allocation.

Definition at line 93 of file ion.h.

◆ ION_IOC_HEAP_QUERY

#define ION_IOC_HEAP_QUERY   _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query)

DOC: ION_IOC_HEAP_QUERY - information about available heaps.

Takes an ion_heap_query structure and populates information about available Ion heaps.

Definition at line 101 of file ion.h.

◆ ION_IOC_MAGIC

#define ION_IOC_MAGIC   'I'

Definition at line 85 of file ion.h.

◆ ION_NUM_HEAP_IDS

#define ION_NUM_HEAP_IDS   (sizeof(unsigned int) * 8)

Definition at line 26 of file ion.h.

◆ MAX_HEAP_NAME

#define MAX_HEAP_NAME   32

Definition at line 60 of file ion.h.

Enumeration Type Documentation

◆ ion_heap_type

enum ion_heap_types - list of all possible types of heaps

Enumerator
ION_HEAP_TYPE_SYSTEM 

memory allocated via vmalloc

ION_HEAP_TYPE_SYSTEM_CONTIG 

memory allocated via kmalloc

ION_HEAP_TYPE_CARVEOUT 

memory allocated from a prereserved carveout heap, allocations are physically contiguous

ION_HEAP_TYPE_CHUNK 
ION_HEAP_TYPE_DMA 

memory allocated via DMA API

ION_HEAP_TYPE_CUSTOM 

must be last so device specific heaps always are at the end of this enum

Definition at line 15 of file ion.h.