MLIR-AIE
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
c
d
h
i
o
p
r
s
u
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
y
z
Typedefs
Enumerations
Enumerator
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
v
x
Functions
a
b
c
d
e
f
g
i
l
m
o
p
s
u
v
Typedefs
a
b
c
i
l
m
p
s
Enumerations
Enumerator
a
c
i
t
Macros
a
d
e
g
i
l
m
n
o
p
s
t
u
x
runtime_lib
test_lib
ion.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
/*
3
* drivers/staging/android/uapi/ion.h
4
*
5
* Copyright (C) 2011 Google, Inc.
6
*/
7
8
#ifndef _UAPI_LINUX_ION_H
9
#define _UAPI_LINUX_ION_H
10
11
#include <linux/ioctl.h>
12
#include <linux/types.h>
13
14
/**
15
* enum ion_heap_types - list of all possible types of heaps
16
* @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc
17
* @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc
18
* @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved
19
* carveout heap, allocations are physically
20
* contiguous
21
* @ION_HEAP_TYPE_DMA: memory allocated via DMA API
22
* @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask
23
* is used to identify the heaps, so only 32
24
* total heap types are supported
25
*/
26
enum
ion_heap_type
{
27
ION_HEAP_TYPE_SYSTEM
,
28
ION_HEAP_TYPE_SYSTEM_CONTIG
,
29
ION_HEAP_TYPE_CARVEOUT
,
30
ION_HEAP_TYPE_CHUNK
,
31
ION_HEAP_TYPE_DMA
,
32
ION_HEAP_TYPE_CUSTOM
,
/*
33
* must be last so device specific heaps always
34
* are at the end of this enum
35
*/
36
};
26
enum
ion_heap_type
{
…
};
37
38
#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8)
39
40
/**
41
* allocation flags - the lower 16 bits are used by core ion, the upper 16
42
* bits are reserved for use by the heaps themselves.
43
*/
44
45
/*
46
* mappings of this buffer should be cached, ion will do cache maintenance
47
* when the buffer is mapped for dma
48
*/
49
#define ION_FLAG_CACHED 1
50
51
/**
52
* DOC: Ion Userspace API
53
*
54
* create a client by opening /dev/ion
55
* most operations handled via following ioctls
56
*
57
*/
58
59
/**
60
* struct ion_allocation_data - metadata passed from userspace for allocations
61
* @len: size of the allocation
62
* @heap_id_mask: mask of heap ids to allocate from
63
* @flags: flags passed to heap
64
* @handle: pointer that will be populated with a cookie to use to
65
* refer to this allocation
66
*
67
* Provided by userspace as an argument to the ioctl
68
*/
69
struct
ion_allocation_data
{
70
__u64
len
;
71
__u32
heap_id_mask
;
72
__u32
flags
;
73
__u32
fd
;
74
__u32
unused
;
75
};
69
struct
ion_allocation_data
{
…
};
76
77
#define MAX_HEAP_NAME 32
78
79
/**
80
* struct ion_heap_data - data about a heap
81
* @name - first 32 characters of the heap name
82
* @type - heap type
83
* @heap_id - heap id for the heap
84
*/
85
struct
ion_heap_data
{
86
char
name
[
MAX_HEAP_NAME
];
87
__u32
type
;
88
__u32
heap_id
;
89
__u32
reserved0
;
90
__u32
reserved1
;
91
__u32
reserved2
;
92
};
85
struct
ion_heap_data
{
…
};
93
94
/**
95
* struct ion_heap_query - collection of data about all heaps
96
* @cnt - total number of heaps to be copied
97
* @heaps - buffer to copy heap data
98
*/
99
struct
ion_heap_query
{
100
__u32
cnt
;
/* Total number of heaps to be copied */
101
__u32
reserved0
;
/* align to 64bits */
102
__u64
heaps
;
/* buffer to be populated */
103
__u32
reserved1
;
104
__u32
reserved2
;
105
};
99
struct
ion_heap_query
{
…
};
106
107
#define ION_IOC_MAGIC 'I'
108
109
/**
110
* DOC: ION_IOC_ALLOC - allocate memory
111
*
112
* Takes an ion_allocation_data struct and returns it with the handle field
113
* populated with the opaque handle for the allocation.
114
*/
115
#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
116
117
/**
118
* DOC: ION_IOC_HEAP_QUERY - information about available heaps
119
*
120
* Takes an ion_heap_query structure and populates information about
121
* available Ion heaps.
122
*/
123
#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query)
124
125
#endif
/* _UAPI_LINUX_ION_H */
MAX_HEAP_NAME
#define MAX_HEAP_NAME
Definition
ion.h:77
ion_heap_type
ion_heap_type
enum ion_heap_types - list of all possible types of heaps @ION_HEAP_TYPE_SYSTEM: memory allocated via...
Definition
ion.h:26
ION_HEAP_TYPE_SYSTEM_CONTIG
@ ION_HEAP_TYPE_SYSTEM_CONTIG
Definition
ion.h:28
ION_HEAP_TYPE_CARVEOUT
@ ION_HEAP_TYPE_CARVEOUT
Definition
ion.h:29
ION_HEAP_TYPE_CHUNK
@ ION_HEAP_TYPE_CHUNK
Definition
ion.h:30
ION_HEAP_TYPE_DMA
@ ION_HEAP_TYPE_DMA
Definition
ion.h:31
ION_HEAP_TYPE_CUSTOM
@ ION_HEAP_TYPE_CUSTOM
Definition
ion.h:32
ION_HEAP_TYPE_SYSTEM
@ ION_HEAP_TYPE_SYSTEM
Definition
ion.h:27
ion_allocation_data
DOC: Ion Userspace API.
Definition
ion.h:69
ion_allocation_data::heap_id_mask
__u32 heap_id_mask
Definition
ion.h:71
ion_allocation_data::fd
__u32 fd
Definition
ion.h:73
ion_allocation_data::flags
__u32 flags
Definition
ion.h:72
ion_allocation_data::unused
__u32 unused
Definition
ion.h:74
ion_allocation_data::len
__u64 len
Definition
ion.h:70
ion_heap_data
Definition
ion.h:85
ion_heap_data::type
__u32 type
Definition
ion.h:87
ion_heap_data::reserved2
__u32 reserved2
Definition
ion.h:91
ion_heap_data::reserved1
__u32 reserved1
Definition
ion.h:90
ion_heap_data::reserved0
__u32 reserved0
Definition
ion.h:89
ion_heap_data::name
char name[MAX_HEAP_NAME]
Definition
ion.h:86
ion_heap_data::heap_id
__u32 heap_id
Definition
ion.h:88
ion_heap_query
struct ion_heap_query - collection of data about all heaps @cnt - total number of heaps to be copied ...
Definition
ion.h:99
ion_heap_query::heaps
__u64 heaps
Definition
ion.h:102
ion_heap_query::reserved0
__u32 reserved0
Definition
ion.h:101
ion_heap_query::reserved1
__u32 reserved1
Definition
ion.h:103
ion_heap_query::cnt
__u32 cnt
Definition
ion.h:100
ion_heap_query::reserved2
__u32 reserved2
Definition
ion.h:104
Generated on Tue Apr 8 2025 05:11:16 for MLIR-AIE by
1.9.8